Skip to content

Suggest relevant threads based on query text

POST
/api/canvas/{deal_id}/chat/threads/suggest
curl --request POST \
--url https://example.com/api/canvas/example/chat/threads/suggest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "query": "example", "current_thread_id": "example" }'

Returns threads whose key_topics overlap with the user’s query.

deal_id
required
Deal Id
string
Media type application/json
ThreadSuggestRequest

Request body for thread suggestions.

object
query
required
Query
string
>= 1 characters <= 500 characters
current_thread_id
Any of:
string
Example generated
{
"query": "example",
"current_thread_id": "example"
}

Successful Response

Media type application/json
ThreadSuggestResponse

Response body for thread suggestions.

object
suggestions
required
Suggestions
Array<object>
ThreadSuggestionItem

A single thread suggestion.

object
thread_id
required
Thread Id
string
title
required
Title
string
summary_excerpt
Any of:
string
matching_topics
Matching Topics
Array<string>
default:
Example
{
"suggestions": [
{
"matching_topics": []
}
]
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}