This web service allows users with the ADMIN
role to create a generative AI profile.
For more information about generative AI profiles, see Generative AI.
Method | Endpoint |
---|---|
POST |
|
Request example
{
"name": "summarize",
"profileId": "summarize",
"profileType": "COMPLETION",
"apiKey": "XXX",
"customPrompt": "Can you write a concise and comprehensive summary of {topic}? The topic is formatted using HTML. Ignore the HTML formatting and focus on the actual text.\n\nYou must begin your message by \"Hi {name}!\".\n\nYou must be concise. Your message should be shorter than the original topic.",
"numSemanticSearchResults": 2
}
Field | Type | Required? | Description |
---|---|---|---|
name |
String | Yes | The name of the profile. |
profileId |
String | Yes | The profile ID of the profile. |
profileType |
String | Yes | The type of the profile. Can be COMPLETION , CHATBOT , or TRANSLATION . |
modelEndpoint |
Object | Yes | An object containing the model details. |
provider |
String | Yes |
|
providerLabel |
String | No | Enter the name of the provider:
|
host |
String | Yes (only with an azureopenai or myllm provider) |
The resource name. For example: my-resource.openai.azure.com . |
modelOrDeploymentId |
String | Yes | The LLM model or translation engine.
|
apiKey |
String | Yes | The API key for the Large Language Model (LLM) provider or translation provider. |
customPrompt |
String | Yes | The LLM prompt. The prompt can contain variables. Place variables in single curly brackets. Users can set the values of these variables when using the Query a large language model (LLM) web service. |
numSemanticSearchResults |
Number | No | Defines the number of semantic search results provided to the large language model (LLM) when calling the Retrieval-augmented generation web service. The value can range from 1 to 20 . By default, the value is 5 . Users can only set this field when profileType has a value of CHATBOT . A higher number of semantic search results can increase the cost of requests, and decrease the speed and quality of answers. For most use cases, use the default value of 5 .The Chatbot component calls the Retrieval-augmented generation web service. |
numSemanticSearchResultsAfterRerank |
Number | No | The number of semantic search results provided to the large language model (LLM) after reranking. The value must be smaller or equal to the value of the numSemanticSearchResults field. |
ragPrompt |
String | No | A Retrieval-augmented generation (RAG) prompt. Asks the user question to the LLM. It must have the {relevant_documents} and {chatbot_instructions} variables. {chatbot_instructions} dynamically contains the relevant documents (gotten through the Clustered semantic search web service), and {chatbot_instructions} is the customPrompt value. |
ragHistoryPrompt |
String | No | A Retrieval-augmented generation (RAG) history prompt. Asks the LLM to transform the user question and the conversation history into a standalone question asked to the LLM. |
translationAdvancedSettings |
String | No | Only with TRANSLATION profiles. Parameters for the translation engine. Accepts JSON as a string. |
profileId
and name
values must be different from existing generative AI profiles.
See Chatbot architecture for a better understanding of the use of Chatbot prompts and reranking.
Response body
{
"id": "7ed9433f-af15-40df-8f32-15beddce37df",
"name": "summarize"
}
Field | Type | Description |
---|---|---|
id |
String | The unique identifier for the profile. |
name |
String | The name of the profile as set in the request. |
Return code | Description |
---|---|
200 OK |
The profile was created successfully. |
401 UNAUTHORIZED |
The authorization header is absent or invalid. |
For a comprehensive list of all possible return codes, see Return codes.