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

chore(cli): update translate CLI configs #5599

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

darcyYe
Copy link
Contributor

@darcyYe darcyYe commented Mar 31, 2024

Summary

  1. Add the support of custom OPENAI_API_PROXY_ENDPOINT, since OPENAI sometimes banned some account for no reasons and there are lot of OPENAI API forwarding services we can take advantage of.
  2. Update the support to custom OPENAI model, can specify using OPENAI_MODEL_NAME env variables. And we updated the default model to be gpt-3.5-turbo-0125.

Testing

N/A

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

@darcyYe darcyYe requested a review from a team March 31, 2024 08:24
Copy link

COMPARE TO master

Total Size Diff 📈 +174 Bytes

Diff by File
Name Diff
packages/cli/src/commands/translate/openai.ts 📈 +174 Bytes

@darcyYe darcyYe merged commit 77fc940 into master Apr 1, 2024
19 checks passed
@darcyYe darcyYe deleted the yemq-update-translate-cli-configuration branch April 1, 2024 09:07
@@ -14,7 +14,7 @@ export const createOpenaiApi = () => {
const proxy = getProxy();

return got.extend({
prefixUrl: 'https://api.openai.com/v1',
prefixUrl: process.env.OPENAI_API_PROXY_ENDPOINT ?? 'https://api.openai.com/v1',
Copy link
Member

Choose a reason for hiding this comment

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

shall wee add these new env variables to the cli docs?

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

Successfully merging this pull request may close these issues.

3 participants