Closed cyflhn closed 1 day ago
It seems like you're encountering an issue with the qwen2-instruct model integration in Dify, specifically related to the tool response dicts requiring a 'name' key. This error might be due to a misconfiguration in the YAML file or the tool's implementation.
Here's what you can check and do to resolve this issue:
Tool Configuration: Ensure that the tool's YAML configuration file includes the identity
section with a name
key. This key should uniquely identify the tool and match the expected name in the code. For example, in the GoogleSearch tool, the configuration looks like this:
identity: # Basic information of the tool
name: google_search # Tool name, unique, no duplication with other tools
author: Dify # Author
label: # Label for frontend display
en_US: GoogleSearch # English label
zh_Hans: 谷歌搜索 # Chinese label
Model Configuration: Verify that the qwen2-instruct model is correctly configured in the YAML file. The configuration should include all necessary parameters and properties, such as model
, model_type
, and features
. You can refer to the specific configuration example for qwen2-instruct:
model: Qwen/Qwen2-1.5B-Instruct
label:
en_US: Qwen/Qwen2-1.5B-Instruct
model_type: llm
features:
- agent-thought
model_properties:
mode: chat
context_size: 32768
Error Handling: Ensure that the model invocation code properly handles errors and that the tool response dicts are correctly structured with all required keys, including name
.
If these steps do not resolve the issue, you might want to check for any updates or patches in the Dify repository that address this specific error.
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.10.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
✔️ Expected Behavior
A normal response should be generated.
❌ Actual Behavior
An error occured. Here is the log:
Server Unavailable Error, Error code: 500 - {'detail': "[address=0.0.0.0:36119, pid=3932702] Tool response dicts require a 'name' key indicating the name of the called function!"}