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

✨ Allow to select another model provider for translation action #1902

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phsontung
Copy link
Contributor

@phsontung phsontung commented Apr 5, 2024

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

Screenshot from 2024-04-05 08-22-06

Screenshot from 2024-04-05 08-26-49

📝 补充信息 | Additional Information

Copy link

vercel bot commented Apr 5, 2024

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

👍 @phsontung

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

@phsontung phsontung changed the title Allow to select another model provider for translation action ✨ Allow to select another model provider for translation action Apr 5, 2024
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

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

Project coverage is 92.89%. Comparing base (27095f5) to head (4b92e84).
Report is 2 commits behind head on main.

Files Patch % Lines
src/store/user/slices/settings/actions/general.ts 63.63% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1902      +/-   ##
==========================================
+ Coverage   92.87%   92.89%   +0.01%     
==========================================
  Files         296      296              
  Lines       16872    16914      +42     
  Branches     1948     1208     -740     
==========================================
+ Hits        15670    15712      +42     
  Misses       1202     1202              

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

@arvinxx
Copy link
Contributor

arvinxx commented Apr 11, 2024

@phsontung hello, sorry for the later reply. Please rebase the config.

@phsontung
Copy link
Contributor Author

@phsontung hello, sorry for the later reply. Please rebase the config.

I have synced with main branch and update source code. Please help review bro.

@arvinxx
Copy link
Contributor

arvinxx commented Apr 22, 2024

@phsontung I think it's really a great idea to have system agent config for LobeChat. but I prefer a single tab Named "System Agent" for this. So we can set different models to summarize, translate, auto agent meta and so on. And in this PR just adding translate config is fine.

@@ -151,6 +153,13 @@ export const DEFAULT_TTS_CONFIG: GlobalTTSConfig = {
sttServer: 'openai',
};

export const DEFAULT_TRANSLATION_CONFIG: GlobalTranslationConfig = {
model: DEFAULT_AGENT_CONFIG.model,
provider: DEFAULT_AGENT_CONFIG.provider || ModelProvider.OpenAI,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just set as OpenAI

@@ -48,12 +53,19 @@ export const chatEnhance: StateCreator<
topicId: get().activeTopicId,
...data,
}),
getCurrentTranslationSetting: () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this method is not used in somewhere else? maybe we can remove it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants