| Name | Type | Description |
|---|---|---|
metadata | Json | Default: NoneThread metadata to filter on. |
values | Json | Default: NoneState values to filter on. |
ids | Sequence[str] | None | Default: None |
status | ThreadStatus | None | Default: None |
limit | int | Default: 10 |
offset | int | Default: 0 |
sort_by | ThreadSortBy | None | Default: None |
sort_order | SortOrder | None | Default: None |
select | list[ThreadSelectField] | None | Default: None |
extract | dict[str, str] | None | Default: None |
headers | Mapping[str, str] | None | Default: None |
params | QueryParamTypes | None | Default: None |
Search for threads.
client = get_sync_client(url="http://localhost:2024")
threads = client.threads.search(
metadata={"number":1},
status="interrupted",
limit=15,
offset=5
)List of thread IDs to filter by.
Thread status to filter on. Must be one of 'idle', 'busy', 'interrupted' or 'error'.
Limit on number of threads to return.
Offset in threads table to start search from.
Sort by field.
Sort order.
List of fields to include in the response.
Dictionary mapping aliases to JSONB paths to extract
from thread data. Paths use dot notation for nested keys and
bracket notation for array indices (e.g.,
{"last_msg": "values.messages[-1]"}). Extracted values are
returned in an extracted field on each thread. Maximum 10
paths per request.
Optional custom headers to include with the request.
Optional query parameters to include with the request.