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

Add a configuration for OpenAI model to use #532

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

michaelbaudino
Copy link
Contributor

OpenAI provides many models (e.g. GPT-3.5 Turbo, GPT-4, GPT-4 Turbo, …), with different prices, context sizes, performance, …

This commit allows users to configure the model they want to use via the translations.openai_model entry in i18n-tasks.yml, but keeps the one that was previously hardcoded as default (gpt-3.5-turbo).

OpenAI provides [many models][0] (e.g. GPT-3.5 Turbo, GPT-4, GPT-4 Turbo, …), with different prices, context sizes, performance, …

This commit allows users to configure the model they want to use via the `translations.openai_model` entry in `i18n-tasks.yml`, but keeps the one that was previously hardcoded as default (`gpt-3.5-turbo`).

[0]: https://platform.openai.com/docs/models
@michaelbaudino
Copy link
Contributor Author

michaelbaudino commented Nov 20, 2023

I also changed the default prompt to instruct OpenAI to never translate HTML markups (<strong>) nor Ruby I18n variables (%{count}).

Would you be interested in a PR that:
1️⃣ → changes the default system prompt with the above suggestions?
2️⃣ → makes the system prompt configurable from i18n-tasks.yml?
3️⃣ → both 1️⃣ and 2️⃣?
4️⃣ → none of the above?

@glebm
Copy link
Owner

glebm commented Nov 20, 2023

Sure, 3 sounds good

@glebm glebm merged commit caa6c53 into glebm:main Nov 20, 2023
5 of 6 checks passed
@michaelbaudino michaelbaudino deleted the allow-openai-model-configuration branch November 20, 2023 11:55
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.

2 participants