-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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 Github Models provider #3869
Conversation
@CloudPassenger is attempting to deploy a commit to the LobeHub Pro Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for raising your pull request and contributing to our Community |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3869 +/- ##
==========================================
+ Coverage 92.18% 92.21% +0.03%
==========================================
Files 464 466 +2
Lines 31862 32132 +270
Branches 3022 3175 +153
==========================================
+ Hits 29371 29631 +260
- Misses 2491 2501 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
dd63895
to
ad5fbe9
Compare
|
@CloudPassenger rebase 下main, ProviderAvatar 这个收到组件里去了 |
@CloudPassenger rebase under main, ProviderAvatar is received in the component |
ad5fbe9
to
98a685e
Compare
已经 rebase,麻烦查阅了,谢谢 |
Already rebase, please check it, thank you |
98a685e
to
de398ff
Compare
确定一下是用 Token 还是 API Key lobe-chat/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx Lines 147 to 161 in 38f6c34
是 Github Token,但我查看了一下并没有给不同 Provider 配置显示的选项,如果我在这里添加根据 id 显示不同文字的逻辑,并且更新 i18n 的话,会是一个好的实践吗? |
确定一下是用 Token 还是 API Key lobe-chat/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx Lines 147 to 161 in 38f6c34
是 Github Token,但我查看了一下并没有给不同 Provider 配置显示的选项,如果我在这里添加根据 id i18n 的话,会是一个好的实践吗? |
这个方案不太好,建议是参考 Azure 或者 Bedrock 的方案,外部覆写下 lobe-chat/src/app/(main)/settings/llm/ProviderList/Bedrock/index.tsx Lines 19 to 30 in 38f6c34
针对 Github 这个再单独加 i18n 比较好 |
This solution is not very good. It is recommended to refer to Azure or Bedrock’s solution and externally overwrite lobe-chat/src/app/(main)/settings/llm/ProviderList/Bedrock/index.tsx Lines 19 to 30 in 38f6c34
For Github, it is better to add i18n separately. |
de398ff
to
cfbdd41
Compare
I have made some changes for this feature. Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把GoogleProviderCard放到BedrockProviderCard后面,不要乱改顺序
Adds support for configuring the GitHub provider in the LLM settings. It includes: - A new `useGithubProvider` hook to define the GitHub provider configuration - Integration of the GitHub provider in the provider list - Localization strings for the GitHub personal access token input The changes allow users to enter their GitHub personal access token to use GitHub-related LLM features.
Adds support for handling invalid Github Personal Access Tokens: - Adds a new `InvalidGithubToken` error type in the `AgentRuntimeErrorType` enum - Adds an error message for `InvalidGithubToken` in the localization files - Configures the Github AI provider to use the new error type This allows properly handling and displaying errors when an invalid Github token is provided.
d8d0e13
to
fb5f2ef
Compare
❤️ Great PR @CloudPassenger ❤️ 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. |
## [Version 1.19.0](v1.18.2...v1.19.0) <sup>Released on **2024-09-18**</sup> #### ✨ Features - **misc**: Add Ai21Labs model provider, add Github Models provider, support native Artifacts just like Claude. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Add Ai21Labs model provider, closes [#3727](#3727) ([d2fe0f0](d2fe0f0)) * **misc**: Add Github Models provider, closes [#3869](#3869) ([8eac1bd](8eac1bd)) * **misc**: Support native Artifacts just like Claude, closes [#3985](#3985) ([0c42c46](0c42c46)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
🎉 This PR is included in version 1.19.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [Version 1.62.0](v1.61.0...v1.62.0) <sup>Released on **2024-09-19**</sup> #### ✨ Features - **misc**: Add Ai21Labs model provider, add Github Models provider, support native Artifacts just like Claude. #### 🐛 Bug Fixes - **misc**: Fix InterceptingRoutes in discover. #### 💄 Styles - **misc**: Add mistral provider new models. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Add Ai21Labs model provider, closes [lobehub#3727](https://github.com/bentwnghk/lobe-chat/issues/3727) ([d2fe0f0](d2fe0f0)) * **misc**: Add Github Models provider, closes [lobehub#3869](https://github.com/bentwnghk/lobe-chat/issues/3869) ([8eac1bd](8eac1bd)) * **misc**: Support native Artifacts just like Claude, closes [lobehub#3985](https://github.com/bentwnghk/lobe-chat/issues/3985) ([0c42c46](0c42c46)) #### What's fixed * **misc**: Fix InterceptingRoutes in discover, closes [lobehub#4011](https://github.com/bentwnghk/lobe-chat/issues/4011) ([2b75040](2b75040)) #### Styles * **misc**: Add mistral provider new models, closes [lobehub#4014](https://github.com/bentwnghk/lobe-chat/issues/4014) ([0b70d57](0b70d57)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
* ✨ feat: add Github Models as provider * :bug fix: sort order of ProviderList * 💄 style: add more info for Github Models provider * ✨ feat: Add GitHub provider configuration Adds support for configuring the GitHub provider in the LLM settings. It includes: - A new `useGithubProvider` hook to define the GitHub provider configuration - Integration of the GitHub provider in the provider list - Localization strings for the GitHub personal access token input The changes allow users to enter their GitHub personal access token to use GitHub-related LLM features. * 🐛 fix: use Github Personal access tokens (classic) instead * 💄 style: Add Invalid Github Token error type and message Adds support for handling invalid Github Personal Access Tokens: - Adds a new `InvalidGithubToken` error type in the `AgentRuntimeErrorType` enum - Adds an error message for `InvalidGithubToken` in the localization files - Configures the Github AI provider to use the new error type This allows properly handling and displaying errors when an invalid Github token is provided. * ✅ test: fix test for new error type * 🐛 fix: sort order of ProviderCards * 💄 style: use abbreviation for Github PAT * 💄 style: add the hyperlink for creating Github PAT * 🌐 chore: improve desc * ✅ test: update test --------- Co-authored-by: arvinxx <arvinx@foxmail.com>
## [Version 1.19.0](lobehub/lobe-chat@v1.18.2...v1.19.0) <sup>Released on **2024-09-18**</sup> #### ✨ Features - **misc**: Add Ai21Labs model provider, add Github Models provider, support native Artifacts just like Claude. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Add Ai21Labs model provider, closes [lobehub#3727](lobehub#3727) ([d2fe0f0](lobehub@d2fe0f0)) * **misc**: Add Github Models provider, closes [lobehub#3869](lobehub#3869) ([8eac1bd](lobehub@8eac1bd)) * **misc**: Support native Artifacts just like Claude, closes [lobehub#3985](lobehub#3985) ([0c42c46](lobehub@0c42c46)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
Support Github Models as LLM model provider
📝 补充信息 | Additional Information
GithubModel
toProviderCombine
in@lobehub/icons