Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Liangpi000 opened this issue Dec 3, 2024 · 5 comments
Open

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

Liangpi000 opened this issue Dec 3, 2024 · 5 comments
Labels
🌠 Feature Request New feature or request | 特性与建议

Comments

@Liangpi000
Copy link

Liangpi000 commented Dec 3, 2024

🥰 需求描述

通义千问模型调用支持联网搜索功能,不过需要在请求中配置。希望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

@Liangpi000 Liangpi000 added the 🌠 Feature Request New feature or request | 特性与建议 label Dec 3, 2024
@lobehubbot
Copy link
Member

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
Copy link
Member

👀 @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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@Kac001
Copy link

Kac001 commented Dec 9, 2024

这个好 希望加入这个功能

@lobehubbot
Copy link
Member

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


This is good. I hope this function can be added.

@Kac001
Copy link

Kac001 commented Dec 13, 2024

@arvinxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌠 Feature Request New feature or request | 特性与建议
Projects
None yet
Development

No branches or pull requests

3 participants