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:
Cameron Pfiffer
2026-01-27 16:14:29 -08:00
parent 3b4811f035
commit aa6149c191
6 changed files with 9 additions and 7 deletions

View File

@@ -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);

View File

@@ -12,5 +12,5 @@ export interface ReleaseNotesConfig {
}
export const DEFAULT_CONFIG: ReleaseNotesConfig = {
model: 'sonnet',
model: 'haiku',
};