mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 02:43:49 +08:00
fix(api): remove unsupported 'user' param from FC/ReAct invoke_llm calls
FunctionCallStrategy and ReActStrategy were passing user=self.context.user_id to ModelInstance.invoke_llm() which doesn't accept that parameter. This caused tool-using agent runs to fail with: "ModelInstance.invoke_llm() got an unexpected keyword argument 'user'" Verified: Agent V2 with current_time tool now works end-to-end: ROUND 1: LLM thought -> CALL current_time -> got time ROUND 2: LLM generates answer with time info Made-with: Cursor
This commit is contained in:
parent
482a004efe
commit
3d4be88d97
@ -92,7 +92,6 @@ class FunctionCallStrategy(AgentPattern):
|
|||||||
tools=current_tools,
|
tools=current_tools,
|
||||||
stop=stop,
|
stop=stop,
|
||||||
stream=stream,
|
stream=stream,
|
||||||
user=self.context.user_id,
|
|
||||||
callbacks=[],
|
callbacks=[],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -114,7 +114,6 @@ class ReActStrategy(AgentPattern):
|
|||||||
model_parameters=model_parameters,
|
model_parameters=model_parameters,
|
||||||
stop=stop,
|
stop=stop,
|
||||||
stream=stream,
|
stream=stream,
|
||||||
user=self.context.user_id or "",
|
|
||||||
callbacks=[],
|
callbacks=[],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user