v46

latestOpenAPI 3.0.3raw.githubusercontent.com2025-05-151340367.2 KB
OpenIA Controller

Update OpenAI Bot

Update OpenAI bot with detailed configuration

put/openai/update/:openaiBotId/{instance}

Path parameters

instancestring required

Name of the instance

openaiBotIdstring required

ID of the bot

Request body

enabledboolean required

Indicates if the bot is enabled

openaiCredsIdstring required

The OpenAI credentials ID

botType'assistant' | 'chatCompletion' required

The type of bot (either 'assistant' or 'chatCompletion')

assistantIdstring

The ID of the assistant (only if 'botType' is 'assistant')

functionUrlstring

The function URL that the bot will call

modelstring required

The OpenAI model to use for chat completion (e.g., 'gpt-4o')

systemMessagesstring[]

The system messages to define the assistant behavior

assistantMessagesstring[]

Messages to be sent by the assistant

userMessagesstring[]

Messages sent by the user

maxTokensinteger

Maximum number of tokens for the bot's responses

triggerType'all' | 'keyword'

The trigger type for the bot (e.g., 'keyword' or 'all')

triggerOperator'equals' | 'contains' | 'startsWith' | 'endsWith' | 'regex' | 'none'

The operator to match the trigger type

triggerValuestring

The value that triggers the bot (e.g., 'teste')

expireinteger

The expiration time of the bot instance in minutes

keywordFinishstring

Keyword to end the bot interaction

delayMessageinteger

Time in milliseconds to delay the message

unknownMessagestring

Message to send if the bot doesn't recognize the input

listeningFromMeboolean

Indicates if the bot should listen for messages from the user

stopBotFromMeboolean

Indicates if the bot can be stopped by the user

keepOpenboolean

Indicates if the bot session should remain open

debounceTimeinteger

Time in milliseconds for the debounce delay

ignoreJidsstring[]

List of JIDs to ignore

Response

Ok