Skip to main content
POST
/
document
/
chat
/
{chat_id}
/
complete
JavaScript
import Morphik from 'morphik';

const client = new Morphik({
  apiKey: 'My API Key',
});

const response = await client.documents.chat.complete('chat_id', { message: 'message' });

console.log(response);
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Headers

authorization
string

Path Parameters

chat_id
string
required

Body

application/json

Request model for document chat completion.

message
string
required
document_id
string | null
session_id
string | null

Response

Successful Response