mirror of
https://github.com/langgenius/dify.git
synced 2026-05-09 21:28:25 +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,
|
||||
stop=stop,
|
||||
stream=stream,
|
||||
user=self.context.user_id,
|
||||
callbacks=[],
|
||||
)
|
||||
|
||||
|
||||
@ -114,7 +114,6 @@ class ReActStrategy(AgentPattern):
|
||||
model_parameters=model_parameters,
|
||||
stop=stop,
|
||||
stream=stream,
|
||||
user=self.context.user_id or "",
|
||||
callbacks=[],
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user