
For pricing information, please refer to Domo’s online consumption terms and the credit rate card in your Domo instance (Admin > Company Settings > Credit Utilization > Rate Card) for more information.Domo’s AI Service Layer enables developers to build AI capabilities into their Domo Apps. In particular, the AI Service Layer currently supports two services from within Apps:
- Text Generation
- Text-to-SQL
- Image-to-Text
Text Generation
Generates a text response from a text prompt. Code Example The
body variable in this post request is an example of a sample request body.
| Property Name | Type | Required | Description |
|---|---|---|---|
| input | String | Required | The prompt you are sending to the model |
| promptTemplate | Object | Optional | An override for the prompt template used in the service. It has one property template, which expects a string. |
| parameters | Object | Optional | Used with the promptTemplate for additional customization. You can pass any key, value pair of strings. See examples below. |
| model | String | Optional | The id of the model you’d like to use if you don’t want to use the default model. |
input string, but you can provide additional properties in the request body to futher customize the text generation service. If you choose to use the promptTemplate property to override the default prompt template, you’ll need to use ${input} into the template string to pass through the input of your prompt.
modelId will return the model and isCustomerModel will be true.
Text-to-SQL
Generates a SQL query based on a prompt and a DataSet’s schema. Code Example The
body variable in this post request is an example of a sample request body.
| Property Name | Type | Required | Description |
|---|---|---|---|
| input | String | Required | The prompt you are sending to the model |
| promptTemplate | Object | Optional | An override for the prompt template used in the service. It has one property template, which expects a string. |
| parameters | Object | Optional | Used with the promptTemplate for additional customization. You can pass any key, value pair of strings. See examples below. |
| model | String | Optional | The id of the model you’d like to use if you don’t want to use the default model. |
| dataSourceSchemas | Array of Objects | Optional | The schemas of datasets that they service should take into account when generating the SQL query from the input prompt. |
input string, but you can provide additional properties in the request body to futher customize the text generation service. If you choose to use the promptTemplate property to override the default prompt template, you’ll need to use ${input} into the template string to pass through the input of your prompt.
modelId will return the model and isCustomerModel will be true.
Image-to-Text
Generates a text response from an image. Code Example The
body variable in this post request is an example of a sample request body.
| Property Name | Type | Required | Description |
|---|---|---|---|
| input | String | Required | The prompt you are sending to the model (e.g., ‘return the text in the image, ensuring new lines are preserved’) |
| image | Object | Required | The image object containing mediaType, type, and data (base64-encoded image). |
| model | String | Required | The id of the model you’d like to use. |
| promptTemplate | Object | Optional | An override for the prompt template used in the service. It has one property template, which expects a string. |
| system | String | Optional | System prompt to guide the OCR process. |
input string and the image object. You can provide additional properties in the request body to further customize the OCR service. If you choose to use the promptTemplate property to override the default prompt template, you’ll need to use ${input} in the template string to pass through the input of your prompt.
<answer> tags as specified in the system prompt.