QwenLM / Qwen-Agent

Agent framework and applications built upon Qwen>=2.0, featuring Function Calling, Code Interpreter, RAG, and Chrome extension.
https://pypi.org/project/qwen-agent/
Other
3.22k stars 313 forks source link

开启parallel function call失败 #226

Open tttonytan opened 3 months ago

tttonytan commented 3 months ago

按照官方实例: responses = [] for responses in llm.chat( messages=messages, functions=functions, stream=True, extra_generate_cfg=dict(

Note: set parallel_function_calls=True to enable parallel function calling

        parallel_function_calls=True,  # Default: False
        # Note: set function_choice='auto' to let the model decide whether to call a function or not
        # function_choice='auto',  # 'auto' is the default if function_choice is not set
        # Note: set function_choice='get_current_weather' to force the model to call this function
        # function_choice='get_current_weather',
    ),

): print(responses) 开启parallel function 调用报错: TypeError: Completions.create() got an unexpected keyword argument 'parallel_function_calls'

tttonytan commented 3 months ago

qwen-agent pip 包版本:0.0.5

JianxinMa commented 3 months ago

qwen-agent pip 包版本:0.0.5

这个还没有发布到pip。目前需要拉取main分支,并pip install -e ./ 的方式安装main分支的代码(见readme)。我今天看下来不来得及发布到pypi

tttonytan commented 3 months ago

qwen-agent pip 包版本:0.0.5

这个还没有发布到pip。目前需要拉取main分支,并pip install -e ./ 的方式安装main分支的代码(见readme)。我今天看下来不来得及发布到pypi

另外想问一下,qwen2本身是支持parallel function call的嘛?

JianxinMa commented 3 months ago

qwen-agent pip 包版本:0.0.5

这个还没有发布到pip。目前需要拉取main分支,并pip install -e ./ 的方式安装main分支的代码(见readme)。我今天看下来不来得及发布到pypi

另外想问一下,qwen2本身是支持parallel function call的嘛?

qwen2模型没训过parallel function call。这次的实现是纯prompt engineering出来的

tttonytan commented 3 months ago

qwen-agent pip 包版本:0.0.5

这个还没有发布到pip。目前需要拉取main分支,并pip install -e ./ 的方式安装main分支的代码(见readme)。我今天看下来不来得及发布到pypi

另外想问一下,qwen2本身是支持parallel function call的嘛?

qwen2模型没训过parallel function call。这次的实现是纯prompt engineering出来的

了解了 感谢答疑