diff --git a/packages/core/src/chat.ts b/packages/core/src/chat.ts index 507e2af9be..eec013baf8 100644 --- a/packages/core/src/chat.ts +++ b/packages/core/src/chat.ts @@ -1049,7 +1049,7 @@ export function tracePromptResult( trace: MarkdownTrace, resp: { text?: string } ) { - const { text } = resp + const { text } = resp || {} // try to sniff the output type const language = JSON5TryParse(text) diff --git a/packages/sample/genaisrc/front-matter.genai.mjs b/packages/sample/genaisrc/front-matter.genai.mjs index be8acd8eeb..c2fa58a398 100644 --- a/packages/sample/genaisrc/front-matter.genai.mjs +++ b/packages/sample/genaisrc/front-matter.genai.mjs @@ -4,8 +4,7 @@ script({ "Update or generate SEO-optimized front matter for a markdown file.", group: "samples", system: ["system", "system.files"], - maxTokens: 2000, - temperature: 0, + temperature: 0.5, model: "large", })