Connection via the API key
The powerful ChatGPT natural language models can be integrated seamlessly into CafeTran workflow. Its linguistic abilities prove very useful offering the whole range of functions such as translation, reviewing, rephrasing, explaining the meaning of terms, listing terms based on various criteria, showing variants of terms etc.
The first step is to register at OpenAI website and receive the API key which lets you connect CafeTran to ChatGPT services powered by OpenAI. Please get familiar with OpenAI pricing and the usage based on tokens (chunks of text) at your account there. For example, the popular gpt-3.5-turbo model costs $0.002 for 1000 tokens (about 750 words). Currently, they offer $5 of free usage to test the natural language models.
Once you receive the API key, follow the simple steps to connect CafeTran with ChatGPT API:
- Choose the Dashboard (or Edit) menu > Preferences > Web services tab.
- Tick the ChatGPT powered by OpenAI checkbox and press the API button.
- Paste the API key in the first field and press OK.
After setting the API key, CafeTran opens its CT-L1 Linguist interface connected to ChatGPT API.
CafeTran offers the simple and highly-customisable CT-L1 Linguist with the text-based chat editor and the following function buttons:
- Translate - it translates the current source language segment or selection.
- Check - it checks for errors in the current target language segment or selection.
- Rephrase - it rephrases the current target segment or selection.
- Explain - it explains the meaning of the selected phrase in the source or target segment.
- Variants - it shows the variants of the selected term or phrase.
- Shorten - it shortens the translation that may be too long.
- Transfer tags - it transfers the tags from the current source segment into the user's translation (e.g from the local translation memory).
- Transfer - it transfers the ChatGPT response to the target language editor.
- New chat - it clears the chat panel and starts a new chat.
- Options - it opens the Options panel.
- Five message buttons to set user-defined prompts for AI.
Furthermore, you can type your own messages or commands in the last line of the chat editor. Such user's prompts are bolded. The predefined messages in the corresponding buttons can be easily adjusted or changed to your own preferences in the Options panel.
The 12.0.3 CafeTran update adds the option to surround a part of the AI message with the asterisk character (*). Then, this part will be displayed as the button's title instead of the default one.
As an option, CafeTran allows to send a message to AI from the target segment editor directly. For example, it might be useful when researching the selected source language phrases. To activate this option, right-click at the target segment editor and choose CT-L1 Linguist toggle button with Σ sigma letter. Then, pressing Enter sends to AI the messages typed in the target segment editor.
Working with CT-L1 Linguist
The messages are triggered via the buttons manually or automatically. The automatic message action is set on each next segment or selection. This behaviour can be changed via the Action box in the Options panel. You can select the default automatic action in the Default box.
The Translate message can make use of your glossary - its matched terms for the current segment. The glossary can be chosen via the Glossary box in the Options panel. If you wish to transfer the ChatGPT translation to the target segment editor automatically, select the Automatic transfer to the target segment box in the Options panel.
If you activate Amazon Polly text to speech API in CafeTran, ChatGPT responses can be spoken out loud. This option appears only if you turn on Amazon Polly web service in CafeTran Preferences > Web services tab.
The context of the message helps to assist AI algorithms in providing the correct answer in a given field of specialisation or in a preferable style. By default, CT-L1 sends the messages in the linguistics context which can be adjusted to your preferences in the General context area of the Options panel.
Furthermore, the user can set a document specific context of the translation in the Specific context area. For example, it may contain instructions on how to handle formatting tags or include additional information about the source language document. Such instructions can tune AI to provide the accurate translation with precise terms.
Please bear in mind that the context counts as tokens so it is more frugal to use short context instructions. You can see the total number of tokens used in one CafeTran session in the Options panel.
To reduce the number of AI queries for selected phrases, CafeTran offers the build-in selection recording feature. It remembers your selections and then sends them all in one batch to AI for translation or explanation.
You can activate selection recording via the Edit > Selection recording menu (F5 shortcut). The button with the mouse icon will appear in the source segment toolbar. Next, just keep selecting your phrases and click the mouse button after each selection to record it. You can skip the button clicking if you choose "Automatic selection recording" in the mouse button options.
After a certain number of selections, click the mouse button and choose Translate in the button options. All the selected phrases will be sent to AI for the specified prompt (translation, explanation etc.). Alternatively, you can trigger the Translate prompt if you click the mouse button while holding the Shift key.
The mouse button options appear when there is no selection.
API data usage policies
Please check OpenAI's policies concerning their API data usage here.