v14

latestOpenAPI 3.0.3raw.githubusercontent.com2023-06-27173980.4 KB

Get AI Content

post/api/ai/content/v2

Request body

questionstring

The question you want to ask the AI.

preserve_historyboolean

Whether you want to preserve the history of the conversation or not.

history_objectobject

The history object that you want to pass to the model. This is only required if preserve_history is set to true. Pass the Questions and Answers as Key Value Pairs to help the model understand.

training_datastring

The training data you want to pass to the AI.

randomnessnumber

The randomness factor that you want to pass to the model. This is only required if you want to set the randomness factor. Default is 0.4. You can set it to 0.0 to disable randomness and set it to 1.0 to enable maximum randomness. We recommend setting it to anything between 0.0 and 0.5 for best results.

Example request

{
  "history_object": {
    "Hi, who are you?": "My name is WorqBot, nice to meet you!",
    "How can you help me?": "I can assist you with various tasks and provide information on a wide range of topics."
  }
}

Response

Success

idstring

The unique identifier associated with the response.

statusstring

The status of the response.

timestampinteger

The timestamp when the response was generated.

contentstring

The content of the response.

processing_countinteger

The number of times the response has been processed.

Example response

{
  "id": "1468dd39-aa8a-495e-9b87-7cf474cdf352",
  "status": "success",
  "timestamp": 1687798163795,
  "content": "Hello! I'm an AI, so I don't have feelings, but I'm here and ready to assist you. How can I help you today?",
  "processing_count": 93
}