fix: update examples to use stream() and haiku model
- Change session.receive() to session.stream() (API change) - Use 'haiku' model instead of 'sonnet' (more reliable) - Clean up debug output 🤖 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com>
This commit is contained in:
@@ -154,7 +154,7 @@ export async function chat(
|
||||
let response = '';
|
||||
const printer = onOutput || createStreamPrinter();
|
||||
|
||||
for await (const msg of session.receive()) {
|
||||
for await (const msg of session.stream()) {
|
||||
if (msg.type === 'assistant') {
|
||||
response += msg.content;
|
||||
printer(msg.content);
|
||||
|
||||
@@ -12,5 +12,5 @@ export interface ReleaseNotesConfig {
|
||||
}
|
||||
|
||||
export const DEFAULT_CONFIG: ReleaseNotesConfig = {
|
||||
model: 'sonnet',
|
||||
model: 'haiku',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user