Managing Assistants & Threads

Overview

Threads and Messages represent a conversation session between an Assistant and a user. There is no limit to the number of Messages you can store in a Thread. When the size of the Messages exceeds the model's context window, the Thread will smartly truncate messages before fully dropping the least important ones.

API Reference

DELETE/assistants/{assistantId}
Path parameters
assistantId*string
Response
Request
const response = await fetch('/assistants/{assistantId}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();

POST/assistants
Body
name*string
description*string
model*enum
mistralai/Mistral-7B-Instruct-v0.1mistralai/Mistral-7B-Instruct-v0.2mistralai/Mixtral-8x7B-Instruct-v0.1
instructionsstring
metadataobject
Response
Request
const response = await fetch('/assistants', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "description": "text",
      "model": "mistralai/Mistral-7B-Instruct-v0.1"
    }),
});
const data = await response.json();

GET/assistants
Query parameters
Response
Request
const response = await fetch('/assistants?LlmAssistant.v1.GetAssistantsDTO=%5Bobject+Object%5D', {
    method: 'GET',
    headers: {},
});
const data = await response.json();

GET/assistants/{assistantId}
Path parameters
assistantId*string
Response
Request
const response = await fetch('/assistants/{assistantId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();

POST/assistants/{assistantId}
Path parameters
assistantId*string
Body
name*string
description*string
model*enum
mistralai/Mistral-7B-Instruct-v0.1mistralai/Mistral-7B-Instruct-v0.2mistralai/Mixtral-8x7B-Instruct-v0.1
instructionsstring
metadataobject
Response
Request
const response = await fetch('/assistants/{assistantId}', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "description": "text",
      "model": "mistralai/Mistral-7B-Instruct-v0.1"
    }),
});
const data = await response.json();

Last updated