Update a thread.
update(
self,
thread_id: str,
*,
metadata: Mapping[str, Any],
ttl: int | Mapping[str, Any] | None = None,
headers: Mapping[str, str] | None = None,
params: QueryParamTypes | None = None
) -> Threadclient = get_sync_client(url="http://localhost:2024")
thread = client.threads.update(
thread_id="my-thread-id",
metadata={"number":1},
ttl=43_200,
)| Name | Type | Description |
|---|---|---|
thread_id* | str | ID of thread to update. |
metadata* | Mapping[str, Any] | Metadata to merge with existing thread metadata. |
ttl | int | Mapping[str, Any] | None | Default: NoneOptional time-to-live in minutes for the thread. You can pass an
integer (minutes) or a mapping with keys |
headers | Mapping[str, str] | None | Default: NoneOptional custom headers to include with the request. |
params | QueryParamTypes | None | Default: NoneOptional query parameters to include with the request. |