The tool fetch for the dify-plugin-ollama function calling function is always an error parameter. #347

Closed
opened 2026-02-16 10:19:04 -05:00 by yindo · 1 comment
Owner

Originally created by @n454149301 on GitHub (Jun 6, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

ollama-0.0.6

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

ollama-0.0.6/models/llm/llm.py

489         if response_tool_call and "function" in response_tool_call:
490             arguments = response_tool_call.get("function", {}).get("arguments")
491             if isinstance(arguments, dict):
492                 arguments = json.dumps(arguments)
493             function = AssistantPromptMessage.ToolCall.ToolCallFunction(
494                 name=response_tool_call.get("function", {}).get("name"),
495                 arguments=arguments,
496             )
497             tool_call = AssistantPromptMessage.ToolCall(
498                 # id=response_tool_call.get("function", {}).get("name"),
499                 id=response_tool_call.get("id"),
500                 type="function",
501                 function=function,
502             )
503         return tool_call

Line 498 should get the id, but it gets the name.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @n454149301 on GitHub (Jun 6, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version ollama-0.0.6 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ollama-0.0.6/models/llm/llm.py ``` 489 if response_tool_call and "function" in response_tool_call: 490 arguments = response_tool_call.get("function", {}).get("arguments") 491 if isinstance(arguments, dict): 492 arguments = json.dumps(arguments) 493 function = AssistantPromptMessage.ToolCall.ToolCallFunction( 494 name=response_tool_call.get("function", {}).get("name"), 495 arguments=arguments, 496 ) 497 tool_call = AssistantPromptMessage.ToolCall( 498 # id=response_tool_call.get("function", {}).get("name"), 499 id=response_tool_call.get("id"), 500 type="function", 501 function=function, 502 ) 503 return tool_call ``` Line 498 should get the id, but it gets the name. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:19:04 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 18, 2025):

Hi, @n454149301. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a bug in dify-plugin-ollama version 0.0.6 regarding the fetch function in llm.py at line 498.
  • The function currently retrieves the function name instead of the function id, causing parameter handling errors.
  • You suggested modifying line 498 to fetch the id rather than the name to fix the issue.
  • No further comments or activity have been recorded on this issue.

What's Next:

  • Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here.
  • If I don’t hear back within 5 days, I will automatically close this issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 18, 2025): Hi, @n454149301. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported a bug in dify-plugin-ollama version 0.0.6 regarding the fetch function in llm.py at line 498. - The function currently retrieves the function name instead of the function id, causing parameter handling errors. - You suggested modifying line 498 to fetch the id rather than the name to fix the issue. - No further comments or activity have been recorded on this issue. **What's Next:** - Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here. - If I don’t hear back within 5 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#347