Skip to content

Commit

Permalink
Add caching to agent options in mixtureOfAgents function
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Sep 24, 2024
1 parent bf36fd9 commit e0d536d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/sample/genaisrc/mixture-of-agents.genai.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
)
)
)
Expand All @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit e0d536d

Please sign in to comment.