Skip to content

Commit 3436da6

Browse files
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
1 parent b909bc8 commit 3436da6

File tree

1 file changed

+1
-1
lines changed
  • langchain/agents/openai_functions_agent

1 file changed

+1
-1
lines changed

langchain/agents/openai_functions_agent/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ async def aplan(
236236
prompt = self.prompt.format_prompt(**full_inputs)
237237
messages = prompt.to_messages()
238238
predicted_message = await self.llm.apredict_messages(
239-
messages, functions=self.functions
239+
messages, functions=self.functions, callbacks=callbacks
240240
)
241241
agent_decision = _parse_ai_message(predicted_message)
242242
return agent_decision

0 commit comments

Comments
 (0)