AI Prompt Provider Module
The AI Prompt Provider module is designed to streamline the process of generating prompts for both custom and natively supported AI providers. By integrating this module into your app, you can create external Pre-translate and Assist prompts that leverage various types of contextual information from your Crowdin projects. The module allows you to compile prompts externally, ensuring they are ready for execution by the AI provider without any further modifications. This approach is particularly beneficial for users with fine-tuned models that require specific prompt structures that differ from those generated by Crowdin, allowing for seamless integration and optimal performance.
Access
You can grant access to this module to one of the following user categories:
For Crowdin:
- Only me (i.e., project owner)
- All project members
- Selected users
For Crowdin Enterprise:
- Only organization admins
- All users in the organization projects
- Selected users
Structure
Properties
key | Type: Required: yes Description: Module identifier within the Crowdin app. |
name | Type: Required: yes Description: The human-readable name of the module. |
logo | Type: Required: yes Description: The relative URL to the custom AI’s logo that will be displayed in the Crowdin UI. |
configuratorUrl | Type: Required: no Description: The relative URL for an iframe that provides a set of options stored in the prompt and will be sent during the compilation. |
compileUrl | Type: Required: yes Description: The relative URL to the API endpoint used for prompt compilation. |
environments | Type: Allowed values: Description: Set of environments where a module could be installed. |
Communication between AI Prompt Provider App and Crowdin
The system collects the strings requiring translation along with all related context and sends this data to the AI Prompt Provider app. The app processes the data, and using compileUrl
, compiles a prompt optimized for a specific AI model and requirements. The compiled prompt is then returned back to Crowdin and sent to the chosen AI provider.
Request to the App from Crowdin for Assist Action
Request payload example:
Request to the App from Crowdin for Pre-translate Action
Request payload example:
Request to the App from Crowdin for Alignment Action
Request payload example:
Expected Response from the App (Plain content)
Response payload example:
Expected Response from the App (Content parts)
Response payload example:
The structure of the responses from the app should correspond to the presented examples, otherwise Crowdin will consider them invalid.