OpenAI API
Step 1: Create an API key in OpenAI Platform
Click on Create new secret key
Name your new API key and click Create secret key
And copy the API Key
Step 2: Install OpenAI Conversation
Go to Settings ➜ MT Engines ➜ Available ➜ OpenAI Conversation
System prompt:
You will be provided with a sentence in $SOURCE_LANG, and
your task is to translate it into $TARGET_LANG. Please translate
the following text naturally and provide only the $TARGET_LANG translation.
System template:
[{"role": "system", "content": "$PROMPT"}]
User template:
[{"role": "user", "content": "$SOURCE_TEXT"}]
Assistant template:
[{"role": "assistant", "content": "$TRANSLATED_TEXT"}]
Error Codes
https://platform.openai.com/docs/guides/error-codes/api-errors
Last updated