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 01.AI as a new provider #1627

Merged
merged 16 commits into from
Mar 25, 2024
Merged

Conversation

MapleEve
Copy link
Contributor

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

根据 Discussion 的步骤添加了零一万物的 API (因为是完全兼容 OpenAI 的所以难度不大)

不支持 FC

📝 补充信息 | Additional Information

由于缺乏 Component 中的定义,所以需要补全 01AI的图标、设置页Logo才能正常显示

Copy link

vercel bot commented Mar 18, 2024

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

👍 @MapleEve

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

@MapleEve
Copy link
Contributor Author

MapleEve commented Mar 19, 2024

目前的编译错误有:

TypeError: Cannot read properties of undefined (reading 'Text')

因为引用的 @lobehub/icons 不包含 ZeroOne
已经支持
lobehub/lobe-icons@fe91b49

@MapleEve
Copy link
Contributor Author

image
image

修改完成了

@lobehubbot
Copy link
Member

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


image
image

Modification completed

@MapleEve
Copy link
Contributor Author

image
Vision

@arvinxx
Copy link
Contributor

arvinxx commented Mar 21, 2024

赞啊 👍🏻 ,等我把 sync 搞完就来 review~

@lobehubbot
Copy link
Member

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


Great 👍🏻, I will review it after I finish sync~

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.

根据review 调整下~

locales/en-US/common.json Outdated Show resolved Hide resolved
src/app/settings/llm/Anthropic/index.tsx Outdated Show resolved Hide resolved
src/app/settings/llm/Groq/index.tsx Outdated Show resolved Hide resolved
src/components/ModelIcon/index.tsx Outdated Show resolved Hide resolved
@MapleEve MapleEve requested a review from arvinxx March 23, 2024 19:07
Copy link

codecov bot commented Mar 23, 2024

Codecov Report

Attention: Patch coverage is 55.15152% with 74 lines in your changes are missing coverage. Please review.

Project coverage is 90.12%. Comparing base (04d8e53) to head (35d0ac2).
Report is 24 commits behind head on main.

Files Patch % Lines
src/libs/agent-runtime/zeroone/index.ts 20.51% 62 Missing ⚠️
src/app/api/chat/[provider]/agentRuntime.ts 46.66% 8 Missing ⚠️
src/app/api/errorResponse.ts 33.33% 2 Missing ⚠️
src/services/_auth.ts 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1627      +/-   ##
==========================================
- Coverage   92.57%   90.12%   -2.45%     
==========================================
  Files         239      245       +6     
  Lines       13066    13870     +804     
  Branches     1562      931     -631     
==========================================
+ Hits        12096    12501     +405     
- Misses        970     1369     +399     

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

@lobehubbot
Copy link
Member

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


Codecov Report

Attention: Patch coverage is 55.15152% with 74 lines in your changes are missing coverage. Please review.

Project coverage is 90.13%. Comparing base (04d8e53) to head (5bbc398).
Report is 21 commits behind head on main.

Files Patch % Lines
src/libs/agent-runtime/zeroone/index.ts 20.51% 62 Missing ⚠️
src/app/api/chat/[provider]/agentRuntime.ts 46.66% 8 Missing ⚠️
src/app/api/errorResponse.ts 33.33% 2 Missing ⚠️
src/services/_auth.ts 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1627      +/-   ##
==========================================
- Coverage   92.57%   90.13%   -2.44%     
==========================================
  Files         239      245       +6     
  Lines       13066    13870     +804     
  Branches     1562      931     -631     
==========================================
+ Hits        12096    12502     +406     
- Misses        970     1368     +398     

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

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.

那个地方再调整下,其他没问题

src/app/settings/llm/Groq/index.tsx Outdated Show resolved Hide resolved
@arvinxx arvinxx changed the title ✨add: Support 01-AI Models ✨ feat: support 01.AI as a new provider Mar 25, 2024
@MapleEve MapleEve requested a review from arvinxx March 25, 2024 04:00
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.

LGTM, I'll merge it.

Copy link

vercel bot commented Mar 25, 2024

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

Name Status Preview Comments Updated (UTC)
lobe-chat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2024 11:54am

@arvinxx arvinxx merged commit 08342fd into lobehub:main Mar 25, 2024
4 of 6 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @MapleEve ❤️

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 25, 2024
## [Version 0.142.0](v0.141.2...v0.142.0)
<sup>Released on **2024-03-25**</sup>

#### ✨ Features

- **misc**: Support 01.AI as a new provider.

<br/>

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

#### What's improved

* **misc**: Support 01.AI as a new provider, closes [#1627](#1627) ([08342fd](08342fd))

</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.142.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 25, 2024
## [Version&nbsp;1.22.0](v1.21.3...v1.22.0)
<sup>Released on **2024-03-25**</sup>

#### ✨ Features

- **misc**: Support 01.AI as a new provider.

<br/>

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

#### What's improved

* **misc**: Support 01.AI as a new provider, closes [lobehub#1627](https://github.com/bentwnghk/lobe-chat/issues/1627) ([08342fd](08342fd))

</details>

<div align="right">

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

</div>
@MapleEve MapleEve deleted the feat_01ai branch March 25, 2024 16:19
jjcruise pushed a commit to jjcruise/lobe-chat that referenced this pull request Mar 26, 2024
* ✨add: Support 01-AI Models

* 🔧 chore: fix a config typo for model desc

* 🌐 add: Base 01.AI locale json

* 🐛 fix: remove custom model name and dark mode Logo for 01AI

* 💄 optimize: optimize the 01AI/Groq icon show and fix unused import

* 💄 optimize: optimize the settings icon show rules

* ✨ feat: add 01.AI APIKey Error Form

* 💄 fix: PR 01.AI review issue

* 💄 revert: Groq logo change

* 🌐 style: update locale
jjcruise pushed a commit to jjcruise/lobe-chat that referenced this pull request Mar 26, 2024
## [Version&nbsp;0.142.0](lobehub/lobe-chat@v0.141.2...v0.142.0)
<sup>Released on **2024-03-25**</sup>

#### ✨ Features

- **misc**: Support 01.AI as a new provider.

<br/>

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

#### What's improved

* **misc**: Support 01.AI as a new provider, closes [lobehub#1627](lobehub#1627) ([08342fd](lobehub@08342fd))

</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.142.0](lobehub/lobe-chat@v0.141.2...v0.142.0)
<sup>Released on **2024-03-25**</sup>

#### ✨ Features

- **misc**: Support 01.AI as a new provider.

<br/>

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

#### What's improved

* **misc**: Support 01.AI as a new provider, closes [#1627](lobehub/lobe-chat#1627) ([08342fd](lobehub/lobe-chat@08342fd))

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