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

✨ feat: add Mistral model support in Bedrock #3810

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

Conversation

hezhijie0327
Copy link
Contributor

@hezhijie0327 hezhijie0327 commented Sep 7, 2024

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

  1. 增加对 Bedrock 中 Mistral (mistral.mistral-small-2402-v1:0, mistral.mistral-large-2402-v1:0, mistral.mistral-large-2407-v1:0) 模型的对话支持
  2. TODO: 待已支持 tools_call

Note: mistral.mistral-large-2407-v1:0 仅在 us-west-2 可用

📝 补充信息 | Additional Information

image
image

Copy link

vercel bot commented Sep 7, 2024

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

A member of the Team first needs to authorize it.

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

Copy link

codecov bot commented Sep 7, 2024

Codecov Report

Attention: Patch coverage is 61.87500% with 61 lines in your changes missing coverage. Please review.

Project coverage is 91.67%. Comparing base (743df51) to head (df25599).
Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
src/libs/agent-runtime/bedrock/index.ts 9.25% 49 Missing ⚠️
...ibs/agent-runtime/utils/streams/bedrock/mistral.ts 88.46% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3810      +/-   ##
==========================================
- Coverage   91.78%   91.67%   -0.12%     
==========================================
  Files         453      456       +3     
  Lines       30201    30592     +391     
  Branches     2084     2124      +40     
==========================================
+ Hits        27719    28044     +325     
- Misses       2482     2548      +66     
Flag Coverage Δ
app 91.67% <61.87%> (-0.12%) ⬇️
server 97.36% <ø> (ø)

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.

@hezhijie0327 hezhijie0327 marked this pull request as ready for review September 7, 2024 15:12
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 🌠 Feature Request New feature or request | 特性与建议 labels Sep 7, 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stream 的部分需要补单测,不加的话基本上过段时间就看不懂了。

参考 https://github.com/hezhijie0327/lobe-chat/blob/bedrock_mistral/src/libs/agent-runtime/utils/streams/openai.test.ts ,加一个基础的 text 和一个 tools 的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加上了

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 | 特性与建议 size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants