Skip to content

Chat

Operations Summary

Method Endpoint Description
POST /api/chat/stream/ Stream

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.

200 -