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

♻️ refactor: Support disable clientFetch by default #3133

Merged
merged 4 commits into from
Jul 9, 2024

Conversation

cy948
Copy link
Contributor

@cy948 cy948 commented Jul 3, 2024

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

  • ♻️ src/config/modelProviders/index.ts: 从 modelConfig 中判断是否允许“客户端请求”
  • ♻️ src/config/modelProviders/qwen.ts: 默认禁用 qwen provider 的“客户端请求”;
  • ♻️ src/store/user/slices/modelList/selectors/modelConfig.ts: 若modelProvider中禁用了provider的“客户端请求”,则不启用;
  • 🧪 src/store/user/slices/modelList/selectors/modelConfig.test.ts: 测试 Qwen Provider 能否被拦截,即使其符合其它启用“客户端请求”的条件;

📝 补充信息 | Additional Information

Copy link

vercel bot commented Jul 3, 2024

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

👍 @cy948

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

@cy948 cy948 marked this pull request as ready for review July 3, 2024 06:52
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.99%. Comparing base (1f05959) to head (5e6bed1).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3133      +/-   ##
==========================================
+ Coverage   93.94%   93.99%   +0.04%     
==========================================
  Files         390      390              
  Lines       24308    24314       +6     
  Branches     2770     1811     -959     
==========================================
+ Hits        22837    22853      +16     
+ Misses       1471     1461      -10     
Flag Coverage Δ
app 93.99% <100.00%> (+0.04%) ⬆️
server 68.31% <70.00%> (-0.01%) ⬇️

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.

src/const/settings/llm.ts Outdated Show resolved Hide resolved
@cy948 cy948 force-pushed the refactor/clientfetch-disabled branch from fca7b43 to fb3876c Compare July 9, 2024 09:20
Copy link

vercel bot commented Jul 9, 2024

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 Jul 9, 2024 2:02pm

@arvinxx arvinxx merged commit 4415652 into lobehub:main Jul 9, 2024
7 of 8 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @cy948 ❤️

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 Jul 9, 2024
### [Version&nbsp;1.3.4](v1.3.3...v1.3.4)
<sup>Released on **2024-07-09**</sup>

#### ♻ Code Refactoring

- **misc**: Support disable clientFetch by default.

<br/>

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

#### Code refactoring

* **misc**: Support disable clientFetch by default, closes [#3133](#3133) [#3108](#3108) ([4415652](4415652))

</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.3.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Jul 9, 2024
### [Version&nbsp;1.46.3](v1.46.2...v1.46.3)
<sup>Released on **2024-07-09**</sup>

#### ♻ Code Refactoring

- **misc**: Support disable clientFetch by default.

<br/>

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

#### Code refactoring

* **misc**: Support disable clientFetch by default, closes [lobehub#3133](https://github.com/bentwnghk/lobe-chat/issues/3133) [lobehub#3108](https://github.com/bentwnghk/lobe-chat/issues/3108) ([4415652](4415652))

</details>

<div align="right">

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

</div>
jasonhp pushed a commit to jasonhp/lobe-chat that referenced this pull request Jul 12, 2024
* ♻️ refactor: Support disable clientFetch by modelConfig (lobehub#3108)

* ✅ test: - clientfetch for qwen

* ♻️ refactor: Remove `defaultShowBrowserRequest` in qwen modelConfig
jasonhp pushed a commit to jasonhp/lobe-chat that referenced this pull request Jul 12, 2024
### [Version&nbsp;1.3.4](lobehub/lobe-chat@v1.3.3...v1.3.4)
<sup>Released on **2024-07-09**</sup>

#### ♻ Code Refactoring

- **misc**: Support disable clientFetch by default.

<br/>

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

#### Code refactoring

* **misc**: Support disable clientFetch by default, closes [lobehub#3133](lobehub#3133) [lobehub#3108](lobehub#3108) ([4415652](lobehub@4415652))

</details>

<div align="right">

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

</div>
Mingholy pushed a commit to Mingholy/lobe-chat that referenced this pull request Jul 16, 2024
* ♻️ refactor: Support disable clientFetch by modelConfig (lobehub#3108)

* ✅ test: - clientfetch for qwen

* ♻️ refactor: Remove `defaultShowBrowserRequest` in qwen modelConfig
Mingholy pushed a commit to Mingholy/lobe-chat that referenced this pull request Jul 16, 2024
### [Version&nbsp;1.3.4](lobehub/lobe-chat@v1.3.3...v1.3.4)
<sup>Released on **2024-07-09**</sup>

#### ♻ Code Refactoring

- **misc**: Support disable clientFetch by default.

<br/>

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

#### Code refactoring

* **misc**: Support disable clientFetch by default, closes [lobehub#3133](lobehub#3133) [lobehub#3108](lobehub#3108) ([4415652](lobehub@4415652))

</details>

<div align="right">

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

</div>
ipoly pushed a commit to ipoly/lobe-chat that referenced this pull request Jul 29, 2024
* ♻️ refactor: Support disable clientFetch by modelConfig (lobehub#3108)

* ✅ test: - clientfetch for qwen

* ♻️ refactor: Remove `defaultShowBrowserRequest` in qwen modelConfig
ipoly pushed a commit to ipoly/lobe-chat that referenced this pull request Jul 29, 2024
### [Version&nbsp;1.3.4](lobehub/lobe-chat@v1.3.3...v1.3.4)
<sup>Released on **2024-07-09**</sup>

#### ♻ Code Refactoring

- **misc**: Support disable clientFetch by default.

<br/>

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

#### Code refactoring

* **misc**: Support disable clientFetch by default, closes [lobehub#3133](lobehub#3133) [lobehub#3108](lobehub#3108) ([4415652](lobehub@4415652))

</details>

<div align="right">

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

</div>
@cy948 cy948 deleted the refactor/clientfetch-disabled branch August 3, 2024 05:17
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.

[Bug] qwen的api key在这里用不了
3 participants