Skip to content

Commit

Permalink
fix: 🐛 handle undefined resp and adjust temperature value
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Dec 19, 2024
1 parent 07f49d1 commit bdf0771
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions packages/sample/genaisrc/front-matter.genai.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
})

Expand Down

0 comments on commit bdf0771

Please sign in to comment.