POST
/
v0
/
chat_sessions
/
{chat_session_id}
/
chat_results
import { InkeepAI } from "@inkeep/ai-api";

async function run() {
  const sdk = new InkeepAI({
    apiKey: "<INKEEP_API_KEY>",
  });

  const chatSessionId = "<CHAT_SESSION_ID>";

  const continuedChat = await sdk.chatSession.continue(chatSessionId, {
    integrationId: "<INKEEP_INTEGRATION_ID>",
    message: {
      role: "user",
      content: "What's next?",
    },
    stream: false,
  });

  /* Example of handling a non-streamed response */

  if (continuedChat.chatResult == null) {
    throw new Error("Empty chat result");
  }

  console.log("Full message:", continuedChat.chatResult.message.content);
  console.log("Citations: ", JSON.stringify(continuedChat.chatResult.message.recordsCited, null, 2));
}

run();
{
  "chat_session_id": "<string>",
  "message": {
    "role": "<string>",
    "content": "<string>",
    "records_cited": {
      "citations": [
        {
          "number": 123,
          "record": {
            "type": "documentation",
            "url": "<string>",
            "title": "<string>",
            "description": "<string>",
            "breadcrumbs": [
              "<string>"
            ]
          },
          "hit_url": "<string>"
        }
      ]
    }
  }
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chat_session_id
string
required

Body

application/json
integration_id
string
required
message
object
required
stream
boolean
default: false

Response

200 - application/json
chat_session_id
string
required
message
object
required