Skip to content

Commit

Permalink
fix: remove unnecessary output parser
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Oct 16, 2023
1 parent 9bfcae9 commit 5cefdf6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion langchain/src/agents/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ export abstract class Agent<
return this.outputParser.parse(output.text, callbackManager);
}

return this.outputParser.parseAgentOutput(output, callbackManager);
return output;
}

/**
Expand Down
9 changes: 1 addition & 8 deletions langchain/src/agents/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,7 @@ export interface RunnableAgentInput<
*/
export abstract class AgentActionOutputParser extends BaseOutputParser<
AgentAction | AgentFinish
> {
parseAgentOutput(
output: AgentFinish | AgentAction,
_callbackManager?: Callbacks
) {
return output;
}
}
> {}

/**
* Type representing the stopping method for an agent. It can be either
Expand Down

0 comments on commit 5cefdf6

Please sign in to comment.