Skip to content

Commit

Permalink
fix: ask uses the prompt-template-* overrides only when it's not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Shibani Basava authored and sinedied committed Dec 4, 2023
1 parent c9c02d3 commit e6b27f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/search/src/lib/approaches/ask-read-retrieve-read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ export class AskReadRetrieveRead extends ApproachBase implements AskApproach {
const executor = await initializeAgentExecutorWithOptions(tools, chatModel, {
agentType: 'chat-zero-shot-react-description',
agentArgs: {
prefix: context?.prompt_template_prefix ?? TEMPLATE_PREFIX,
suffix: context?.prompt_template_suffix ?? TEMPLATE_SUFFIX,
prefix: context?.prompt_template_prefix || TEMPLATE_PREFIX,
suffix: context?.prompt_template_suffix || TEMPLATE_SUFFIX,
inputVariables: ['input', 'agent_scratchpad'],
},
returnIntermediateSteps: true,
Expand Down

0 comments on commit e6b27f6

Please sign in to comment.