Skip to main content
POST
/
api
/
v2
/
tools
/
chatflows
/
curl --request POST \
--url https://paradigm.lighton.ai/api/v2/tools/chatflows/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"content": "Hello, what can you help me with?"
}
]
}'
{
  "id": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "chat_message": 123,
  "text": "<string>",
  "error_message": "<string>",
  "completion": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "is_chosen": true,
  "document_extracts": [
    {
      "id": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "chat_response_id": 123,
      "document_id": 123,
      "page_start": 1073741823,
      "page_end": 4611686018427388000,
      "text": "<string>",
      "document_name": "<string>",
      "document_file_type": "<string>",
      "metadata": {},
      "document_external_url": "<string>",
      "document_datasource_name": "<string>",
      "document_workspace_name": "<string>"
    }
  ],
  "source": "embeddings",
  "flag_created_at": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

Request serializer for creating a chatflow.

messages
string
required

List of messages for the chatflow conversation

model
string | null

Model to use for the chatflow, must exist and be configured from the admin

tool
string | null

Tool to use for the chatflow, must exist and be configured from the admin

workspace_ids
integer[]

List of workspace IDs whose documents will be added to scope

file_ids
integer[]

List of document IDs that will be added to scope

company_scope
boolean

Include documents from company scope

private_scope
boolean

Include documents from private scope

Response

Successful response

id
integer
required
created_at
string<date-time>
required
document_extracts
object[]
required
flag_created_at
string | null
required
chat_message
integer | null
text
string | null
error_message
string | null
completion
string<uuid> | null
is_chosen
boolean
source
enum<string>
  • embeddings - embeddings
  • corpus - corpus
Available options:
embeddings,
corpus
I