Connection via the API key


The powerful ChatGPT and Claude AI natural language models can be integrated seamlessly into CafeTran workflow. Their 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's ChatGPT website or Anthropic's Claude website or Google's Gemini website to receive the API key which lets you connect CafeTran to ChatGPT, Claude AI or Gemini. Please get familiar with OpenAI, Anthropic and Google pricing as well as the usage based on tokens (chunks of text) at your account there. For example, OpenAI's popular gpt-3.5-turbo model costs $0.002 for 1000 tokens (about 750 words).


Once you receive the API key, follow the simple steps to connect CafeTran with ChatGPT, Claude and Gemini API:

  • Choose the Dashboard (or Edit) menu > Preferences > Web services tab.
  • Tick ChatGPT powered by OpenAI checkbox and press the API button.
  • Tick Claude powered by Anthropic checkbox and press the API button.
  • Tick Gemini powered by Google checkbox and press the API button.
  • Paste the API key in the API key field and press OK.


After setting the API key, CafeTran opens its CT-L1 Linguist interface connected to ChatGPT, Claude or Gemini API. Please make sure the AI services are enabled in the Dashboard > Other resources and services tab.


CT-L1 Linguist


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 AI 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.


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 AI translation to the target segment editor automatically, select the Automatic transfer to the target segment box in the Options panel.


Text to Speech (TTS)


To enrich the translation experience, CT-L1 Linguist offers ChatGPT's feature to speak the text by the AI-generated voice. The integration via OpenAI's API has the following speech options:

  • speaking the source segments or target segments.
  • speaking AI translation and its responses to the prompts.
  • speaking the selected text.


These speech options are available after the click at the Options button in the CT-L1 Linguist tab. The new microphone button is displayed in the source editor toolbar. It can be used when the automatic speech is turned off.


Alternatively, CafeTran can connect to the excellent Amazon's Polly text to speech service. This option appears only if you turn on Amazon Polly web service in CafeTran Preferences > Web services tab. The above CT-L1 speech options can be set for this TTS service as well.


Please make sure you control the costs through your OpenAI.com (or Amazon's account in case of using Polly TTS). To limit the paid usage, you can set in CT's options to speak only the selected phrases or only when clicking the microphone button.


Context


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.


Selection recording


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.

Anthropic's data usage policy can be read here.

Google's Gemini API Terms are here.