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

🐛 fix: fix enable_search parameter intro condition in Qwen #5297

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

hezhijie0327
Copy link
Contributor

@hezhijie0327 hezhijie0327 commented Jan 5, 2025

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

  1. enable_search 仅对商业模型 qwen-max, qwen-plus, qwen-turbo 系列生效
  2. 引入两个环境变量
变量名 描述 默认值 可选值
QWEN_ENABLE_SEARCH 模型在生成文本时是否使用互联网搜索结果进行参考 0 1
QWEN_SEARCH_STRATEGY 搜索互联网信息的数量 standard pro

close #5296

📝 补充信息 | Additional Information

ref: https://help.aliyun.com/zh/model-studio/developer-reference/use-qwen-by-calling-api

image
image

Copy link

vercel bot commented Jan 5, 2025

@hezhijie0327 is attempting to deploy a commit to the LobeHub Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 5, 2025
Copy link

gru-agent bot commented Jan 5, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail defa656 🚫 Skipped No files need to be tested {"src/libs/agent-runtime/qwen/index.ts":"no test value"}

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@lobehubbot
Copy link
Member

👍 @hezhijie0327

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@dosubot dosubot bot added the 🐛 Bug Something isn't working | 缺陷 label Jan 5, 2025
Copy link

codecov bot commented Jan 5, 2025

Codecov Report

Attention: Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 91.72%. Comparing base (bde6d64) to head (9f16d4b).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/libs/agent-runtime/qwen/index.ts 68.75% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5297      +/-   ##
==========================================
- Coverage   91.73%   91.72%   -0.01%     
==========================================
  Files         591      591              
  Lines       46027    46042      +15     
  Branches     2833     2713     -120     
==========================================
+ Hits        42221    42231      +10     
- Misses       3806     3811       +5     
Flag Coverage Δ
app 91.72% <68.75%> (-0.01%) ⬇️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jan 5, 2025
@PatriciaLee3
Copy link

Thank you very much for your PR.
Perhaps we should provide an option for people to choose whether to enable this feature, rather than having it on in all cases. IMO, it is unclear how enable_search affects the model's input, and it may lead to difficulties in calculating the number of tokens and unexpected usage costs.

@hezhijie0327
Copy link
Contributor Author

@PatriciaLee3 added QWEN_ENABLE_SEARCH & QWEN_SEARCH_STRATEGY, should suit your requirement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Not all Qwen models support the "enable_search" parameter
3 participants