Prediction

Create a new prediction

post

Create a new prediction

Authorizations
Path parameters
idstringRequired

Chatflow ID

Body
questionstringOptional

The question being asked

overrideConfigobjectOptional

The configuration to override the default prediction settings (optional)

Responses
200
Prediction created successfully
application/json
post
POST /prediction/{id} HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 278

{
  "question": "text",
  "overrideConfig": {},
  "history": [
    {
      "role": "apiMessage",
      "content": "Hello, how can I help you?"
    }
  ],
  "uploads": [
    {
      "type": "file",
      "name": "image.png",
      "data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABjElEQVRIS+2Vv0oDQRDG",
      "mime": "image/png"
    }
  ]
}
{
  "text": "text",
  "json": {},
  "question": "text",
  "chatId": "text",
  "chatMessageId": "text",
  "sessionId": "text",
  "memoryType": "text",
  "sourceDocuments": [
    {
      "pageContent": "This is the content of the page.",
      "metadata": {
        "author": "John Doe",
        "date": "2024-08-24"
      }
    }
  ],
  "usedTools": [
    {
      "tool": "Name of the tool",
      "toolInput": {
        "input": "search query"
      },
      "toolOutput": "text"
    }
  ],
  "fileAnnotations": [
    {
      "filePath": "path/to/file",
      "fileName": "file.txt"
    }
  ]
}

Last updated