From 499fb6539250427ce4ad50d325e0cfb39ac38806 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 27 Sep 2024 23:00:18 +0000 Subject: [PATCH] Update trace function and add cache configuration in genai script --- packages/core/src/chat.ts | 2 +- packages/sample/genaisrc/gai.genai.mts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/chat.ts b/packages/core/src/chat.ts index f3ba87b261..26420d2d08 100644 --- a/packages/core/src/chat.ts +++ b/packages/core/src/chat.ts @@ -647,6 +647,6 @@ export async function executeChatSession( export function tracePromptResult(trace: MarkdownTrace, resp: RunPromptResult) { const { json, text } = resp - trace.detailsFenced(`🔠 output`, text, `markdown`) + trace.details(`🔠 output`, text) if (resp.json) trace.detailsFenced("📩 JSON (parsed)", json, "json") } diff --git a/packages/sample/genaisrc/gai.genai.mts b/packages/sample/genaisrc/gai.genai.mts index d52669b886..8c7d0e2819 100644 --- a/packages/sample/genaisrc/gai.genai.mts +++ b/packages/sample/genaisrc/gai.genai.mts @@ -13,6 +13,7 @@ script({ }, system: ["system", "system.files"], flexTokens: 30000, + cache: "gai", }) // Assign the 'workflow' parameter from environment variables