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

Automate News Post Translations #364

Open
Naviary2 opened this issue Dec 8, 2024 · 0 comments
Open

Automate News Post Translations #364

Naviary2 opened this issue Dec 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Naviary2
Copy link
Member

Naviary2 commented Dec 8, 2024

By automating the translations of new news posts with a large language model, we offload the responsibility of translating those off of our translators and maintainers, and news posts are translated immediately without delay.

Overview of how to add:

  1. Install the openai npm package.

  2. Ask Naviary for an API key. Modify env.js to include a OPEN_AI_KEY property in our generated .env file. Stick the API key in there.

  3. Create a new script, on startup, that will create a list of all news posts present in translation/news/en-US that aren't in the other language's news post folders.

  4. Then, for each missing post, it uses the openai package to send a prompt to ChatGPT, asking them to translate it into a single missing language. One prompt per language.

  5. Save each response as a new news post in the respective language's news post directory.

@Naviary2 Naviary2 added the enhancement New feature or request label Dec 8, 2024
@Naviary2 Naviary2 changed the title Automatic News Post Translations Automate News Post Translations Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant