lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Qwen / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS/Plugins/Artifacts). One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
46.82k stars 10.32k forks source link

[Request] 增加通义千问打开联网搜索的开关 #4877

Open Liangpi000 opened 18 hours ago

Liangpi000 commented 18 hours ago

🥰 需求描述

通义千问模型调用支持联网搜索功能,不过需要在请求中配置。希望lobe能增加一个开关,打开后能启用通义千问的联网搜索功能。

🧐 解决方案

希望lobe能增加一个开关,打开后能启用通义千问的联网搜索功能。

curl -X POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
    "model": "qwen-plus",
    "messages": [
        {
            "role": "system",
            "content": "You are a helpful assistant."
        },
        {
            "role": "user", 
            "content": "中国队在巴黎奥运会获得了多少枚金牌"
        }
    ],
    **"enable_search": true**
}'

📝 补充信息

No response

lobehubbot commented 18 hours ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


🥰 Description of requirements

Tongyi Qianwen model call supports the online search function, but it needs to be configured in the request. I hope that Lobe can add a switch, and when turned on, it can enable Tongyi Qianwen's Internet search function.

🧐 Solution

I hope that Lobe can add a switch, and when turned on, it can enable Tongyi Qianwen's Internet search function.

curl -X POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \ -H "Authorization: Bearer $DASHSCOPE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen-plus", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "How many gold medals did the Chinese team win at the Paris Olympics?" } ], "enable_search": true }'

📝 Supplementary information

No response

lobehubbot commented 18 hours ago

👀 @Liangpi000

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。