Open codingl2k1 opened 4 days ago
I couldn't reproduce this issue with stream=True
and oai qwen2-7b (the final output of llm.chat
is a function call message, as expected). Is any code of qwen-agent modified? I'm using pip install -U "qwen-agent>=0.0.6"
BTW, last_msg
, as shown in your screenshot, is indeed plain text, not a function-call like structured message. This is expected. Users should not use last_msg
directly here. Instead, users should use the final output of llm.chat
(which is post-processed and is structured as a function call message).
I am using the latest master. Qwen 2 7b and Qwen 1.5 7b are from the latest huggingface. The stream result can't be parsed as a tool call result, so I inspect the original output from the LLM as shown in the screenshot.
I have tested the Qwen-Agent tool call with qwen2 7b and qwen 1.5 7b by https://github.com/QwenLM/Qwen-Agent/blob/main/examples/function_calling.py
The![image](https://github.com/QwenLM/Qwen-Agent/assets/138426806/5c87ad67-d164-4397-9f4b-be34228f9ffc)
stream=True
returns a plain string:The![image](https://github.com/QwenLM/Qwen-Agent/assets/138426806/da020995-ce0e-4179-b626-23278414608e)
stream=False
returns a correct tool call result: