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: support mistral as model provider #1455

Merged
merged 3 commits into from
Mar 7, 2024

Conversation

danielglh
Copy link
Contributor

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

Added a new model provider, Mistral, along with the 5 models it currently provides.

image image image

📝 补充信息 | Additional Information

Different API Parameters

According to the official API doc, Mistral API doesn't seem to support these parameters: presence_penalty, frequency_penalty. Therefore the implementation needs to pick only the supported parameters and the presence_penalty, frequency_penalty settings do not affect Mistral models.

Copy link

vercel bot commented Mar 3, 2024

@danielglh 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

👍 @danielglh

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

@arvinxx
Copy link
Contributor

arvinxx commented Mar 5, 2024

@danielglh please rebase the main and solve the conflicts~

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.57%. Comparing base (227101a) to head (388e2c0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1455      +/-   ##
==========================================
+ Coverage   92.38%   92.57%   +0.19%     
==========================================
  Files         230      232       +2     
  Lines       12278    12447     +169     
  Branches     1483     1509      +26     
==========================================
+ Hits        11343    11523     +180     
+ Misses        935      924      -11     

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

@arvinxx
Copy link
Contributor

arvinxx commented Mar 5, 2024

@danielglh I think the code is really clean and great. This time can we bump up the test coverage to 100% for the mistral provider and anthropic provider relative code?

@danielglh
Copy link
Contributor Author

@danielglh please rebase the main and solve the conflicts~

@arvinxx already did

@danielglh
Copy link
Contributor Author

danielglh commented Mar 5, 2024

@danielglh I think the code is really clean and great. This time can we bump up the test coverage to 100% for the mistral provider and anthropic provider relative code?

For sure. I've already added tests for mistral (mostly just copied from the perplexity/moonshot tests). Not sure how to check the test coverage of each provider though. @arvinxx

@danielglh
Copy link
Contributor Author

@arvinxx added tests for anthropic and mistral. Hopefully the coverage should be good now.

@arvinxx
Copy link
Contributor

arvinxx commented Mar 7, 2024

plz rebase it

@danielglh
Copy link
Contributor Author

plz rebase it

@arvinxx done

Copy link
Contributor

@arvinxx arvinxx left a comment

Choose a reason for hiding this comment

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

Nice work! LGTM, I'll merge it~ Thanks for your contribution👏

@arvinxx arvinxx merged commit 4f94bfe into lobehub:main Mar 7, 2024
4 of 5 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @danielglh ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

github-actions bot pushed a commit that referenced this pull request Mar 7, 2024
## [Version 0.133.0](v0.132.2...v0.133.0)
<sup>Released on **2024-03-07**</sup>

#### ✨ Features

- **misc**: Support Mistral model provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Support Mistral model provider, closes [#1455](#1455) ([4f94bfe](4f94bfe))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

🎉 This PR is included in version 0.133.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Mar 7, 2024
## [Version&nbsp;1.15.0](v1.14.5...v1.15.0)
<sup>Released on **2024-03-07**</sup>

#### ✨ Features

- **misc**: Support Mistral model provider.

#### 🐛 Bug Fixes

- **misc**: Fix anthropic streaming on Vercel/Cloudflare.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Support Mistral model provider, closes [lobehub#1455](https://github.com/bentwnghk/lobe-chat/issues/1455) ([4f94bfe](4f94bfe))

#### What's fixed

* **misc**: Fix anthropic streaming on Vercel/Cloudflare, closes [lobehub#1480](https://github.com/bentwnghk/lobe-chat/issues/1480) ([227101a](227101a))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
miroshar-success added a commit to miroshar-success/OpenAI_Integraion_platform that referenced this pull request Apr 5, 2024
## [Version&nbsp;0.133.0](lobehub/lobe-chat@v0.132.2...v0.133.0)
<sup>Released on **2024-03-07**</sup>

#### ✨ Features

- **misc**: Support Mistral model provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Support Mistral model provider, closes [#1455](lobehub/lobe-chat#1455) ([4f94bfe](lobehub/lobe-chat@4f94bfe))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

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

Successfully merging this pull request may close these issues.

3 participants