mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-18 18:53:10 +00:00
Fix callback forwarding in async plan method for OpenAI function agent (#6584)
The callback argument was missing, preventing me to get callbacks to work properly when using it async
This commit is contained in:
parent
b909bc8b58
commit
3436da65a4
@ -236,7 +236,7 @@ class OpenAIFunctionsAgent(BaseSingleActionAgent):
|
||||
prompt = self.prompt.format_prompt(**full_inputs)
|
||||
messages = prompt.to_messages()
|
||||
predicted_message = await self.llm.apredict_messages(
|
||||
messages, functions=self.functions
|
||||
messages, functions=self.functions, callbacks=callbacks
|
||||
)
|
||||
agent_decision = _parse_ai_message(predicted_message)
|
||||
return agent_decision
|
||||
|
Loading…
Reference in New Issue
Block a user