Skip to main content
Version: Next

Hugging Face Translation Prompt

This Translation action allows for immediate, direct text translations across all configured language pairs without the need for asynchronous processes. Leveraging the Hugging Face language models, this standalone action facilitates understanding and communicating in multiple languages directly from the Copilot interface.

caution

Please note, translating large texts in a single request may result in unexpected behavior or errors. It is recommended to split large texts into smaller segments for accurate translations.

Available Context

For more information on context limitations refer to the Available Context section.

Multiselect: No Elements: Data Objects, Assets, Documents

Configuration Options

model_endpoint: 'https://api-inference.huggingface.co/models/Helsinki-NLP/opus-mt-en-de'

Detailed Configuration Options

  • model_endpoint: Type: String. Endpoint url of the Hugging Face model to use.

Additional Information

For accurate translations, it's important to select the right model from Hugging Face. The model_endpoint must include both the input and output languages, following the pattern /models/Helsinki-NLP/opus-mt-[input_language]-[output_language].

For example, translating English to French requires the endpoint https://api-inference.huggingface.co/models/Helsinki-NLP/opus-mt-en-fr, where en is English and fr is French. This ensures the action uses a model specifically trained for your desired language pair.