Powered by GPT 3.5, this plugin adds a translation button to every post
Requirements
- OpenAI API key in your
config.json
(which is placed in your root directory). - PostgreSQL Database
Installation
npm install nodebb-plugin-cobi-translate-posts
Details
All posts will be cached in your nodebb-associated database. The table post
will contain two columns: pid
(integer) and translations
(JSON). Translations will be a list of language tags, indicating which translations are cached. Any of the tags here will lead to a table with the same name with the following columns: pid
(integer) and translation
(TEXT). Saving posts this way allows us to limit the API requests to a minimum.
Editing a post (and therefore changing its content) will delete all current translations for it from your database, both in the post
table and each of the language tables.