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 Cohere provider support #7016

Merged
merged 8 commits into from
Mar 19, 2025
Merged

Conversation

hezhijie0327
Copy link
Contributor

@hezhijie0327 hezhijie0327 commented Mar 17, 2025

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

  1. 增加对 Cohere 的支持
  2. 更新模型列表及价格 [TODO]
  3. 支持模型列表获取 [TODO]
  4. 移除 userstream_options 参数
  5. 修正 frequency_penalty presence_penalty top_p 范围
  6. Cohere Provider 图标更新 💄 style: support cohere provider lobe-icons#88

功能 截图
对话 image
工具调用 image
多模态 image
客户端请求 image
模型列表获取 image
模型列表 imageimage

📝 补充信息 | Additional Information

ref: https://docs.cohere.com/docs/compatibility-api
model: https://docs.cohere.com/v2/docs/models
price: https://cohere.com/pricing
parameters: https://docs.cohere.com/v2/docs/compatibility-api#unsupported-parameters


req: #6157 (comment)

close #3681
close #2068
close #6999

Copy link

vercel bot commented Mar 17, 2025

@hezhijie0327 is attempting to deploy a commit to the LobeChat Desktop 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 Mar 17, 2025

Codecov Report

Attention: Patch coverage is 87.60807% with 43 lines in your changes missing coverage. Please review.

Project coverage is 91.32%. Comparing base (de8df94) to head (219a27c).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
src/libs/agent-runtime/cohere/index.ts 37.68% 43 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7016      +/-   ##
==========================================
- Coverage   91.34%   91.32%   -0.02%     
==========================================
  Files         733      736       +3     
  Lines       69493    69840     +347     
  Branches     3410     3410              
==========================================
+ Hits        63478    63782     +304     
- Misses       6015     6058      +43     
Flag Coverage Δ
app 91.32% <87.60%> (-0.02%) ⬇️
server 97.49% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hezhijie0327 hezhijie0327 marked this pull request as ready for review March 17, 2025 15:37
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 17, 2025
Copy link
Contributor

gru-agent bot commented Mar 17, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 94cb887 🚫 Skipped No files need to be tested {"Dockerfile":"target file(Dockerfile) not in work scope \n include: src/utils,src/server,src/database,src/services,src/store,packages//src/ \n exclude: node_modules,/*.test.ts,/.test.tsx,**/.spec.ts,/*.spec.tsx,/.d.ts,**/.test.js,/*.spec.js,src/database/server","Dockerfile.database":"target file(Dockerfile.database) not in work scope \n include: src/utils,src/server,src/database,src/services,src/store,packages//src/** \n exclude: node_modules,/*.test.ts,/.test.tsx,**/.spec.ts,/*.spec.tsx,/.d.ts,**/.test.js,/*.spec.js,src/database/server","Dockerfile.pglite":"target file(Dockerfile.pglite) not in work scope \n include: src/utils,src/server,src/database,src/services,src/store,packages//src/** \n exclude: node_modules,/*.test.ts,/.test.tsx,**/.spec.ts,/*.spec.tsx,/.d.ts,**/.test.js,**/*.spec.js,src/database/server","src/app/[variants]/(main)/settings/llm/ProviderList/providers.tsx":"target file(src/app/[variants]/…

Tip

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

@dosubot dosubot bot added Model Provider 模型服务商 🌠 Feature Request New feature or request | 特性与建议 labels Mar 17, 2025
Copy link

vercel bot commented Mar 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2025 6:14am

@arvinxx arvinxx merged commit 2a4e2ed into lobehub:main Mar 19, 2025
12 of 15 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @hezhijie0327 ❤️

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 19, 2025
## [Version&nbsp;1.73.0](v1.72.1...v1.73.0)
<sup>Released on **2025-03-19**</sup>

#### ✨ Features

- **misc**: Add Cohere provider support, add search1api crawler implementation for WeChat Sogou links.

<br/>

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

#### What's improved

* **misc**: Add Cohere provider support, closes [#7016](#7016) ([2a4e2ed](2a4e2ed))
* **misc**: Add search1api crawler implementation for WeChat Sogou links, closes [#7036](#7036) ([7327138](7327138))

</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 1.73.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@hezhijie0327 hezhijie0327 deleted the cohere branch March 19, 2025 21:38
github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Mar 20, 2025
## [Version&nbsp;1.114.0](v1.113.1...v1.114.0)
<sup>Released on **2025-03-20**</sup>

#### ✨ Features

- **misc**: Add Cohere provider support, add search1api crawler implementation for WeChat Sogou links.

<br/>

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

#### What's improved

* **misc**: Add Cohere provider support, closes [lobehub#7016](https://github.com/bentwnghk/lobe-chat/issues/7016) ([2a4e2ed](2a4e2ed))
* **misc**: Add search1api crawler implementation for WeChat Sogou links, closes [lobehub#7036](https://github.com/bentwnghk/lobe-chat/issues/7036) ([7327138](7327138))

</details>

<div align="right">

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

</div>
github-actions bot pushed a commit to jaworldwideorg/OneJA-Bot that referenced this pull request Mar 20, 2025
## [Version&nbsp;1.73.0](v1.72.3...v1.73.0)
<sup>Released on **2025-03-20**</sup>

#### ✨ Features

- **misc**: Add Cohere provider support, add search1api crawler implementation for WeChat Sogou links.

<br/>

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

#### What's improved

* **misc**: Add Cohere provider support, closes [lobehub#7016](https://github.com/jaworldwideorg/OneJA-Bot/issues/7016) ([2a4e2ed](2a4e2ed))
* **misc**: Add search1api crawler implementation for WeChat Sogou links, closes [lobehub#7036](https://github.com/jaworldwideorg/OneJA-Bot/issues/7036) ([7327138](7327138))

</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
🌠 Feature Request New feature or request | 特性与建议 Model Provider 模型服务商 released size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
3 participants