geekan / MetaGPT

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
https://deepwisdom.ai/
MIT License
41.33k stars 4.93k forks source link

Dashscope service causing :ValueError: too many values to unpack (expected 11) #1367

Open dahaipeng opened 4 days ago

dahaipeng commented 4 days ago

https://github.com/geekan/MetaGPT/blob/9f8f0a27fd3e7d6a7f6fcf40103a94829533bdc2/metagpt/provider/dashscope_api.py#L51 When using DashScope service, in this line, the_get_protocol_paramsmethod returns 13 values but the unpack logic assumes that 11 values are returned, causing the ValueError: too many values to unpack (expected 11). A proper way that works for me is adding another two values in the unpacking logic:

(
        api_protocol,
        ws_stream_mode,
        is_binary_input,
        http_method,
        stream,
        async_request,
        query,
        headers,
        request_timeout,
        form,
        resources,
        base_address,
        flattened_output
    ) = _get_protocol_params(kwargs)

The version of dashscope package is 1.19.3