From e0d536d3546e79b4c3b0fb2777be651a99c5c1c9 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 24 Sep 2024 19:49:24 +0000 Subject: [PATCH] Add caching to agent options in mixtureOfAgents function --- packages/sample/genaisrc/mixture-of-agents.genai.mts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/sample/genaisrc/mixture-of-agents.genai.mts b/packages/sample/genaisrc/mixture-of-agents.genai.mts index 0e45f603f0..53804d88e9 100644 --- a/packages/sample/genaisrc/mixture-of-agents.genai.mts +++ b/packages/sample/genaisrc/mixture-of-agents.genai.mts @@ -21,7 +21,7 @@ export async function mixtureOfAgents( ctx.writeText(query) ctx.assistant(`What do you think?`) }, - { ...agent, label: agent.label || agent.model } + { ...agent, cache: "moa", label: agent.label || agent.model } ) ) ) @@ -39,7 +39,7 @@ export async function mixtureOfAgents( } _.$`Please provide your critique for each candidate:` }, - { ...(options ?? {}), label: "critique" } + { ...(options ?? {}), cache: "moa", label: "critique" } ) // final prompt @@ -55,7 +55,7 @@ export async function mixtureOfAgents( _.def(`Critique`, critique) _.$`Please provide a final, optimized response to the original query:` }, - { ...(options ?? {}), label: "final" } + { ...(options ?? {}), cache: "moa", label: "final" } ) return result }