Change an AI profile - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service allows users with the ADMIN role to change an AI profile.

It is necessary to provide an Ft-Calling-App value when using Fluid Topics web services. See Fluid Topics calling app.

For more information about AI profiles, see AI.

Method Endpoint
PUT
/api/admin/ai/profiles/{id}
Path parameter Type Description
{id} String The AI profile's random ID. Call the List AI profiles web service, and use the profile's id value.

Request example

{
  "profileType": "TRANSLATION",
  "name": "Phrase",
  "profileId": "phrase",
  "modelEndpoint": {
    "provider": "phrase",
    "providerLabel": "Phrase",
    "modelOrDeploymentId": "",
    "host": ""
  },
  "authenticationMethod": {
    "type": "username_password",
    "label": "Username and password",
    "authenticationParameters": [
      {
        "label": "Username",
        "key": "username",
        "value": "Username",
        "isSecret": false,
        "isOptional": false
      },
      {
        "label": "Password",
        "key": "password",
        "value": "Password",
        "isSecret": true,
        "isOptional": false
      }
    ]
  },
  "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.",
  "translationAdvancedSettings": "",
  "numSemanticSearchResults": "",
  "numSemanticSearchResultsAfterRerank": "",
  "ragPrompt": "",
  "ragHistoryPrompt": ""
}
Field Type Required? Description
name String Yes The name of the profile.
profileId String Yes The profile ID of the profile. It can only include alphanumeric characters, hyphens (-), and underscores (_).
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
  • For CHATBOT, and COMPLETION profiles, can only be one of the following values: anthropic, azureopenai, fluidtopics, googleai, myllm, openai.
  • For TRANSLATION profiles, can be deepl_pro, intento, or phrase.
providerLabel String No Enter the name of the provider:
  • anthropic: Anthropic
  • azureopenai: Azure OpenAI
  • deepl_pro: DeepL Pro
  • fluidtopics: Fluid Topics
  • googleai: Google AI
  • intento: Intento
  • myllm: MyLLM
  • openai: OpenAI
  • phrase: Phrase
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.
  • It is possible to enter any value, as long as it matches a valid model from the selected LLM provider. A list of models and engines is available in the AI menu. It is not exhaustive.
  • Enter an empty value for DeepL Pro.
authenticationMethod Object Yes Contain the details for the authentication to the provider.
type String Yes The type of authentication. Possible values are username_password or api_key.
label String Yes The label for the type of authentication.
authenticationParameters Object Yes The list of parameters to connect to the provider.
label String Yes The label for the authentication parameter.
key String Yes The key for the authentication parameter.
value String Yes The value for the authentication parameter.
isSecret Boolean Yes Whether the parameter is secret or not.
isOptional Boolean Yes Whether the parameter is optional or not.
customPrompt String Yes Only with CHATBOT or COMPLETION profiles. The LLM prompt. The prompt can contain variables. Place variables in single curly brackets. Users can set the values of variables when using the AI method in Custom components, or the Query a large language model (LLM) web service.
numSemanticSearchResults Number No Only with CHATBOT profiles. 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.
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 Only with CHATBOT profiles. 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 Only with CHATBOT profiles. A Retrieval-augmented generation (RAG) prompt. Asks the user question to the LLM. It must have the {relevant_documents} variable, and the {chatbot_instructions} variable for Chatbot profiles. {relevant_documents} dynamically contains the relevant documents (gotten through the Clustered semantic search web service), and {chatbot_instructions} is the customPrompt value.
ragHistoryPrompt String No Only with CHATBOT profiles. 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.
translationDestinationLanguages Array No Only with TRANSLATION profiles. A list of target languages available to end users in On-demand translation components that use this profile.
The expected format depends on the translation provider. For example, it may be fr or fr-FR for French.

profileId and name values must be different from existing AI profiles.

Response body

This web service does not return a response body when successful.

Return code Description
200 OK The profile was changed successfully.
401 UNAUTHORIZED The authorization header is absent or invalid.

For a comprehensive list of all possible return codes, see Return codes.