Skip to content

Chat

Operations Summary

Method Endpoint Description
GET /api/chat-messages/ List Chat Messages
GET /api/chat-sessions/current/ Get or create current user's chat session
GET /api/chat-sessions/ List Chat Sessions
GET /api/chat-sessions/{uuid}/ Retrieve
GET /api/chat-system-prompts/ List Chat System Prompts
GET /api/chat-system-prompts/{uuid}/ Retrieve
GET /api/chat-threads/ List Chat Threads
GET /api/chat-threads/{uuid}/ Retrieve
POST /api/chat-messages/{uuid}/feedback/ Submit or update feedback for an assistant message
POST /api/chat/stream/ Stream
POST /api/chat-system-prompts/{uuid}/activate/ Activate a system prompt
POST /api/chat-system-prompts/ Create
POST /api/chat-system-prompts/{uuid}/deactivate/ Deactivate the active system prompt
POST /api/chat-threads/{uuid}/archive/ Archive thread
POST /api/chat-threads/{uuid}/cancel/ Cancel active stream
POST /api/chat-threads/{uuid}/unarchive/ Unarchive thread
PUT /api/chat-system-prompts/{uuid}/ Update
PATCH /api/chat-system-prompts/{uuid}/ Partial Update
DELETE /api/chat-system-prompts/{uuid}/ Delete

List Chat Messages

1
2
3
4
http \
  GET \
  https://api.example.com/api/chat-messages/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.chat_messages import chat_messages_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = chat_messages_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: chat_messages_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { chatMessagesList } from 'waldur-js-client';

try {
  const response = await chatMessagesList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type
feedback_score boolean
include_history boolean
is_flagged boolean
thread string (uuid)

200 -

The response body is an array of objects, where each object has the following structure:

Field Type Description
uuid string (uuid)
thread string (uuid)
role any
blocks array of objects
blocks.id string
blocks.key string
Enum: markdown, code, mermaid, vm_order, resource_list, homeport_nav, ask_user_form, tool
blocks.status string
warning string
sequence_index integer
replaces string (uuid)
created string (date-time)
input_tokens integer
output_tokens integer
is_flagged boolean
severity any
injection_categories any
pii_categories any
action_taken any
feedback_score boolean User feedback: True=thumbs up, False=thumbs down, None=no feedback.
feedback_comment string Optional user comment accompanying feedback.
feedback_category any Category tag when feedback_score is False (thumbs down); null otherwise.
feedback_submitted_at string (date-time) Timestamp of the most recent feedback submission; overwritten on resubmit.

Get or create current user's chat session

Returns the current user's chat session, creating it if it doesn't exist.

1
2
3
4
http \
  GET \
  https://api.example.com/api/chat-sessions/current/ \
  Authorization:"Token YOUR_API_TOKEN"
1
2
3
4
5
6
7
8
9
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.chat_sessions import chat_sessions_current_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = chat_sessions_current_retrieve.sync(client=client)

print(response)
  1. API Source: chat_sessions_current_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { chatSessionsCurrentRetrieve } from 'waldur-js-client';

try {
  const response = await chatSessionsCurrentRetrieve({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}

200 -

Field Type
uuid string (uuid)
user string (uuid)
user_username string
user_full_name string
created string (date-time)
modified string (date-time)

List Chat Sessions

1
2
3
4
http \
  GET \
  https://api.example.com/api/chat-sessions/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.chat_session_field_enum import ChatSessionFieldEnum # (1)
from waldur_api_client.api.chat_sessions import chat_sessions_list # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = chat_sessions_list.sync(client=client)

for item in response:
    print(item)
  1. Model Source: ChatSessionFieldEnum
  2. API Source: chat_sessions_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { chatSessionsList } from 'waldur-js-client';

try {
  const response = await chatSessionsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
field array
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.

200 -

The response body is an array of objects, where each object has the following structure:

Field Type
uuid string (uuid)
user string (uuid)
user_username string
user_full_name string
created string (date-time)
modified string (date-time)

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/chat-sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.chat_session_field_enum import ChatSessionFieldEnum # (1)
from waldur_api_client.api.chat_sessions import chat_sessions_retrieve # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = chat_sessions_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. Model Source: ChatSessionFieldEnum
  2. API Source: chat_sessions_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { chatSessionsRetrieve } from 'waldur-js-client';

try {
  const response = await chatSessionsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Name Type
field array

200 -

Field Type
uuid string (uuid)
user string (uuid)
user_username string
user_full_name string
created string (date-time)
modified string (date-time)

List Chat System Prompts

1
2
3
4
http \
  GET \
  https://api.example.com/api/chat-system-prompts/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.chat_system_prompts import chat_system_prompts_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = chat_system_prompts_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: chat_system_prompts_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { chatSystemPromptsList } from 'waldur-js-client';

try {
  const response = await chatSystemPromptsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.

200 -

The response body is an array of objects, where each object has the following structure:

Field Type Description
uuid string (uuid)
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.
is_active boolean Whether this prompt is currently used by the AI Assistant. Only one prompt can be active.
created string (date-time)
modified string (date-time)

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/chat-system-prompts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.chat_system_prompts import chat_system_prompts_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = chat_system_prompts_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: chat_system_prompts_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { chatSystemPromptsRetrieve } from 'waldur-js-client';

try {
  const response = await chatSystemPromptsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type Description
uuid string (uuid)
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.
is_active boolean Whether this prompt is currently used by the AI Assistant. Only one prompt can be active.
created string (date-time)
modified string (date-time)

List Chat Threads

1
2
3
4
http \
  GET \
  https://api.example.com/api/chat-threads/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.injection_severity_enum import InjectionSeverityEnum # (1)
from waldur_api_client.models.thread_session_field_enum import ThreadSessionFieldEnum # (2)
from waldur_api_client.models.thread_session_o_enum import ThreadSessionOEnum # (3)
from waldur_api_client.models.thread_session_scope_enum import ThreadSessionScopeEnum # (4)
from waldur_api_client.api.chat_threads import chat_threads_list # (5)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = chat_threads_list.sync(client=client)

for item in response:
    print(item)
  1. Model Source: InjectionSeverityEnum
  2. Model Source: ThreadSessionFieldEnum
  3. Model Source: ThreadSessionOEnum
  4. Model Source: ThreadSessionScopeEnum
  5. API Source: chat_threads_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { chatThreadsList } from 'waldur-js-client';

try {
  const response = await chatThreadsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
created string (date)
field array
has_feedback boolean
input_tokens_max number
input_tokens_min number
is_archived boolean
is_flagged boolean
max_severity string Enum: none, low, medium, high, critical
modified string (date)
o array Ordering

output_tokens_max number
output_tokens_min number
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
query string
scope string Enum: own
total_tokens_max number
total_tokens_min number
user string (uuid)

200 -

The response body is an array of objects, where each object has the following structure:

Field Type
uuid string (uuid)
name string
chat_session string (uuid)
flags any
is_archived boolean
message_count integer
input_tokens integer
output_tokens integer
total_tokens integer
title_gen_input_tokens integer
title_gen_output_tokens integer
is_flagged boolean
max_severity any
has_feedback boolean
user_username string
user_full_name string
created string (date-time)
modified string (date-time)

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/chat-threads/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.thread_session_field_enum import ThreadSessionFieldEnum # (1)
from waldur_api_client.api.chat_threads import chat_threads_retrieve # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = chat_threads_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. Model Source: ThreadSessionFieldEnum
  2. API Source: chat_threads_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { chatThreadsRetrieve } from 'waldur-js-client';

try {
  const response = await chatThreadsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Name Type
field array

200 -

Field Type
uuid string (uuid)
name string
chat_session string (uuid)
flags any
is_archived boolean
message_count integer
input_tokens integer
output_tokens integer
total_tokens integer
title_gen_input_tokens integer
title_gen_output_tokens integer
is_flagged boolean
max_severity any
has_feedback boolean
user_username string
user_full_name string
created string (date-time)
modified string (date-time)

Submit or update feedback for an assistant message

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/chat-messages/a1b2c3d4-e5f6-7890-abcd-ef1234567890/feedback/ \
  Authorization:"Token YOUR_API_TOKEN" \
  score=true
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.message_feedback_request import MessageFeedbackRequest # (1)
from waldur_api_client.api.chat_messages import chat_messages_feedback # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = MessageFeedbackRequest(
    score=true
)
response = chat_messages_feedback.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: MessageFeedbackRequest
  2. API Source: chat_messages_feedback
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import { chatMessagesFeedback } from 'waldur-js-client';

try {
  const response = await chatMessagesFeedback({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "score": true
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
score boolean Feedback score: true=thumbs up, false=thumbs down.
comment string Optional comment.
category any Optional category tag (only accepted when score=false).

200 -

Field Type Description
uuid string (uuid)
thread string (uuid)
role any
blocks array of objects
blocks.id string
blocks.key string
Enum: markdown, code, mermaid, vm_order, resource_list, homeport_nav, ask_user_form, tool
blocks.status string
warning string
sequence_index integer
replaces string (uuid)
created string (date-time)
input_tokens integer
output_tokens integer
is_flagged boolean
severity any
injection_categories any
pii_categories any
action_taken any
feedback_score boolean User feedback: True=thumbs up, False=thumbs down, None=no feedback.
feedback_comment string Optional user comment accompanying feedback.
feedback_category any Category tag when feedback_score is False (thumbs down); null otherwise.
feedback_submitted_at string (date-time) Timestamp of the most recent feedback submission; overwritten on resubmit.

Stream

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/chat/stream/ \
  Authorization:"Token YOUR_API_TOKEN" \
  input="string-value"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.chat_request_request import ChatRequestRequest # (1)
from waldur_api_client.api.chat import chat_stream # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = ChatRequestRequest(
    input="string-value"
)
response = chat_stream.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: ChatRequestRequest
  2. API Source: chat_stream
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { chatStream } from 'waldur-js-client';

try {
  const response = await chatStream({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "input": "string-value"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required Description
input string User input text for the chat model.
thread_uuid string (uuid) Existing thread UUID. If omitted, a new thread is created.
mode any 'reload': replace the last assistant response. 'edit': edit a user message and re-stream. Omit for normal new-message behavior.
edit_message_uuid string (uuid) UUID of the user message to edit. Required when mode='edit'.

200 -


Activate a system prompt

Set this prompt as the active one. Deactivates any currently active prompt.

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/chat-system-prompts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/activate/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-chat-system-prompt"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.system_prompt_request import SystemPromptRequest # (1)
from waldur_api_client.api.chat_system_prompts import chat_system_prompts_activate # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = SystemPromptRequest(
    name="my-awesome-chat-system-prompt"
)
response = chat_system_prompts_activate.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: SystemPromptRequest
  2. API Source: chat_system_prompts_activate
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import { chatSystemPromptsActivate } from 'waldur-js-client';

try {
  const response = await chatSystemPromptsActivate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-chat-system-prompt"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.

200 -

Field Type Description
uuid string (uuid)
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.
is_active boolean Whether this prompt is currently used by the AI Assistant. Only one prompt can be active.
created string (date-time)
modified string (date-time)

Create

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/chat-system-prompts/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-chat-system-prompt"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.system_prompt_request import SystemPromptRequest # (1)
from waldur_api_client.api.chat_system_prompts import chat_system_prompts_create # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = SystemPromptRequest(
    name="my-awesome-chat-system-prompt"
)
response = chat_system_prompts_create.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: SystemPromptRequest
  2. API Source: chat_system_prompts_create
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { chatSystemPromptsCreate } from 'waldur-js-client';

try {
  const response = await chatSystemPromptsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-chat-system-prompt"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required Description
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.

201 -

Field Type Description
uuid string (uuid)
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.
is_active boolean Whether this prompt is currently used by the AI Assistant. Only one prompt can be active.
created string (date-time)
modified string (date-time)

Deactivate the active system prompt

Deactivate this prompt. The system will fall back to Constance overrides or built-in defaults.

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/chat-system-prompts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/deactivate/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-chat-system-prompt"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.system_prompt_request import SystemPromptRequest # (1)
from waldur_api_client.api.chat_system_prompts import chat_system_prompts_deactivate # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = SystemPromptRequest(
    name="my-awesome-chat-system-prompt"
)
response = chat_system_prompts_deactivate.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: SystemPromptRequest
  2. API Source: chat_system_prompts_deactivate
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import { chatSystemPromptsDeactivate } from 'waldur-js-client';

try {
  const response = await chatSystemPromptsDeactivate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-chat-system-prompt"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.

200 -

Field Type Description
uuid string (uuid)
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.
is_active boolean Whether this prompt is currently used by the AI Assistant. Only one prompt can be active.
created string (date-time)
modified string (date-time)

Archive thread

Archive a thread (soft delete).

1
2
3
4
http \
  POST \
  https://api.example.com/api/chat-threads/a1b2c3d4-e5f6-7890-abcd-ef1234567890/archive/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.thread_session_request import ThreadSessionRequest # (1)
from waldur_api_client.api.chat_threads import chat_threads_archive # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = ThreadSessionRequest()
response = chat_threads_archive.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: ThreadSessionRequest
  2. API Source: chat_threads_archive
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { chatThreadsArchive } from 'waldur-js-client';

try {
  const response = await chatThreadsArchive({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
is_archived boolean

204 - No response body


Cancel active stream

Request cancellation of the active LLM stream for this thread.

1
2
3
4
http \
  POST \
  https://api.example.com/api/chat-threads/a1b2c3d4-e5f6-7890-abcd-ef1234567890/cancel/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.thread_session_request import ThreadSessionRequest # (1)
from waldur_api_client.api.chat_threads import chat_threads_cancel # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = ThreadSessionRequest()
response = chat_threads_cancel.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: ThreadSessionRequest
  2. API Source: chat_threads_cancel
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { chatThreadsCancel } from 'waldur-js-client';

try {
  const response = await chatThreadsCancel({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
is_archived boolean

200 - No response body


Unarchive thread

Restore an archived thread.

1
2
3
4
http \
  POST \
  https://api.example.com/api/chat-threads/a1b2c3d4-e5f6-7890-abcd-ef1234567890/unarchive/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.thread_session_request import ThreadSessionRequest # (1)
from waldur_api_client.api.chat_threads import chat_threads_unarchive # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = ThreadSessionRequest()
response = chat_threads_unarchive.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: ThreadSessionRequest
  2. API Source: chat_threads_unarchive
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { chatThreadsUnarchive } from 'waldur-js-client';

try {
  const response = await chatThreadsUnarchive({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
is_archived boolean

204 - No response body


Update

1
2
3
4
5
http \
  PUT \
  https://api.example.com/api/chat-system-prompts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-chat-system-prompt"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.system_prompt_request import SystemPromptRequest # (1)
from waldur_api_client.api.chat_system_prompts import chat_system_prompts_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = SystemPromptRequest(
    name="my-awesome-chat-system-prompt"
)
response = chat_system_prompts_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: SystemPromptRequest
  2. API Source: chat_system_prompts_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import { chatSystemPromptsUpdate } from 'waldur-js-client';

try {
  const response = await chatSystemPromptsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-chat-system-prompt"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.

200 -

Field Type Description
uuid string (uuid)
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.
is_active boolean Whether this prompt is currently used by the AI Assistant. Only one prompt can be active.
created string (date-time)
modified string (date-time)

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/chat-system-prompts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.patched_system_prompt_request import PatchedSystemPromptRequest # (1)
from waldur_api_client.api.chat_system_prompts import chat_system_prompts_partial_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PatchedSystemPromptRequest()
response = chat_system_prompts_partial_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PatchedSystemPromptRequest
  2. API Source: chat_system_prompts_partial_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { chatSystemPromptsPartialUpdate } from 'waldur-js-client';

try {
  const response = await chatSystemPromptsPartialUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.

200 -

Field Type Description
uuid string (uuid)
name string
description string
custom_instructions string Additional instructions injected into the system prompt. Use this for organisation-specific context, terminology, FAQ content, or behavioural guidelines. Supports {assistant_name} and {organization} placeholders.
is_active boolean Whether this prompt is currently used by the AI Assistant. Only one prompt can be active.
created string (date-time)
modified string (date-time)

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/chat-system-prompts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.chat_system_prompts import chat_system_prompts_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = chat_system_prompts_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: chat_system_prompts_destroy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { chatSystemPromptsDestroy } from 'waldur-js-client';

try {
  const response = await chatSystemPromptsDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body