Last updated 2 months ago
Create a new prediction
Chatflow ID
The question being asked
The configuration to override the default prediction settings (optional)
The history messages to be prepended (optional)
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" } ] }
Prediction created successfully
{ "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" } ] }