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

🐛fix: wrong judgement on client fetch #2519

Merged
merged 5 commits into from
May 20, 2024

Conversation

cy948
Copy link
Contributor

@cy948 cy948 commented May 15, 2024

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

  • 🐛 src/store/user/slices/settings/selectors/modelConfig.ts: 不再根据用户填写的 endpoint 自动开启客户端请求;

== 05/16/2024 更新 ==

  • 🧪 src/store/user/slices/settings/selectors/modelConfig.test.ts: 增加两条测试:
    • 在用户不主动开启的情况下,功能是关闭的,
    • 在用户主动打开时,功能是启用的;

== 05/17/2024 更新 ==

📝 补充信息 | Additional Information

  • 🤔 目前尚不清楚是否需要强制展示“客户端请求”的功能开关,或是当“客户端请求”功能启用后,强制显示能关闭该功能的 Switch;
  • 该 fix 合并后,除了初始化 Store 时读取的设置外,将无隐式启用“客户端请求”功能的代码部分;
  • Preview

Copy link

vercel bot commented May 15, 2024

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

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

Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.42%. Comparing base (7263a33) to head (fbb4bf9).
Report is 1 commits behind head on main.

Current head fbb4bf9 differs from pull request most recent head 4bbe7f1

Please upload reports for the commit 4bbe7f1 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2519      +/-   ##
==========================================
- Coverage   93.43%   93.42%   -0.01%     
==========================================
  Files         325      325              
  Lines       19686    19689       +3     
  Branches     2331     2330       -1     
==========================================
+ Hits        18393    18395       +2     
- Misses       1293     1294       +1     

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

@cy948 cy948 changed the title 🐛fix: wrong client fetch judgement 🐛fix: wrong judgement on client fetch May 15, 2024
@arvinxx
Copy link
Contributor

arvinxx commented May 15, 2024

需要补充一条单测

@lobehubbot
Copy link
Member

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


Need to add a single test

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.

Thanks!

@arvinxx
Copy link
Contributor

arvinxx commented May 20, 2024

当“客户端请求”功能启用后,强制显示能关闭该功能的 Switch;

我觉得仍然应该是默认服务端请求,直到用户填写了 proxy 之后,才会显示允许 client 请求。

@lobehubbot
Copy link
Member

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


When the "Client Request" function is enabled, force the display of the Switch that can turn off this function;

I think it should still be the default server request. The client request will not be allowed until the user fills in the proxy.

@arvinxx arvinxx merged commit 5fc90a9 into lobehub:main May 20, 2024
2 of 3 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 消息。

@lobehubbot
Copy link
Member

🎉 This PR is included in version 0.160.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

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] Azure OpenAI does not provide server-side option
3 participants