v46

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

Create OpenAI

Create an OpenAI bot with detailed configuration

post/openai/create/{instance}

Path parameters

instancestring required

Name of the instance

Request body

enabledboolean required

Indicates whether the bot is enabled

openaiCredsIdstring required

ID of the OpenAI credentials

botTypestring required

Type of the bot (e.g., 'assistant')

assistantIdstring required

Unique identifier for the assistant

functionUrlstring required

URL for additional bot functionality

modelstring required

Model to be used (e.g., 'gpt-4o')

systemMessagesstring[] required

Messages to define system behavior

assistantMessagesstring[] required

Predefined assistant messages

userMessagesstring[] required

Predefined user messages

maxTokensinteger required

Maximum number of tokens per interaction

triggerTypestring required

Type of trigger for the bot

triggerOperatorstring required

Operator for trigger evaluation

triggerValuestring required

Value to trigger the bot

expireinteger required

Expiration time in seconds

keywordFinishstring required

Keyword to terminate the bot interaction

delayMessageinteger required

Delay before the bot responds, in milliseconds

unknownMessagestring required

Message to display for unrecognized input

listeningFromMeboolean required

Indicates if the bot listens to messages from the user

stopBotFromMeboolean required

Indicates if the bot can be stopped by the user

keepOpenboolean required

Indicates if the bot session remains open

debounceTimeinteger required

Debounce time for message processing

ignoreJidsstring[] required

List of JIDs to ignore

Response

Ok