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: Improve Doubao provider #5612

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

sxjeru
Copy link
Contributor

@sxjeru sxjeru commented Jan 28, 2025

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

豆包大模型目前存在一些问题,希望这个 pr 能一口气解决。

备注 NEXT_PUBLIC_CLIENT_DB=pglite

  • 修复聊天,支持环境变量添加的模型
  • 添加模型支持部署名
  • 连通性检查,目前仅临时解决(见下1
  • 模型配置页提示语仍为 Azure OpenAI
  • 利用环境变量添加的 model 无法在 /settings/provider/doubao 模型列表中出现(个人无法解决
  • 待发现...

📝 补充信息 | Additional Information

  1. 关于连通性检查问题,getModelCardsById 方法拿到的 chatModelCards 如图所示,理论上应该是分出 deploymentName 才对。目前只在 src/app/(main)/settings/provider/(detail)/doubao/page.tsx 做了临时适配,之后应该修复 chatModelCards 。
    (个人应该无法解决)

image

Copy link

vercel bot commented Jan 28, 2025

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

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

👍 @sxjeru

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.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 82.71605% with 14 lines in your changes missing coverage. Please review.

Project coverage is 92.14%. Comparing base (4b41ad4) to head (0e25345).
Report is 52 commits behind head on main.

Files with missing lines Patch % Lines
src/libs/agent-runtime/doubao/index.ts 44.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5612      +/-   ##
==========================================
- Coverage   92.16%   92.14%   -0.03%     
==========================================
  Files         647      647              
  Lines       57652    57673      +21     
  Branches     4269     2907    -1362     
==========================================
+ Hits        53137    53144       +7     
- Misses       4515     4529      +14     
Flag Coverage Δ
app 92.14% <82.71%> (-0.03%) ⬇️
server 98.01% <ø> (ø)

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.

@LovelyGuYiMeng
Copy link
Contributor

顺带把doubao 1.5的模型加上

@lobehubbot
Copy link
Member

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


By the way, add the Doubao 1.5 model

@LovelyGuYiMeng
Copy link
Contributor

还有Provider名称别用中文豆包,用Doubao就行

@lobehubbot
Copy link
Member

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


And the name of the provider name, do not use Chinese bean bags, just use Double

@arvinxx
Copy link
Contributor

arvinxx commented Feb 3, 2025

理论上应该是分出 deploymentName 才对

这个 id: Doubao-pro->xxx 的解析应该有问题,你仔细看下环境变量读取的那部分逻辑,应该要加一个参数做 -> 符号的解析的

@lobehubbot
Copy link
Member

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


Theoretically it should be divided into deploymentName

This ID: The analysis of the analysis of the ID: Doubao-Pro-> XXX should have problems. If you carefully look at the part of the logic of the environment variable read, you should add a parameter to the analysis of the symbol of the symbol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants