Update an assistant.
Use this to point to a different graph, update the configuration, or change the metadata of an assistant.
update(
self,
assistant_id: str,
*,
graph_id: str | None = None,
config: Config | None = None,
context: Context | None = None,
metadata: Json = None,
name: str | None = None,
headers: Mapping[str, str] | None = None,
description: str | None = None,
params: QueryParamTypes | None = None
) -> Assistantclient = get_client(url="http://localhost:2024")
assistant = await client.assistants.update(
assistant_id='e280dad7-8618-443f-87f1-8e41841c180f',
graph_id="other-graph",
context={"model_name": "anthropic"},
metadata={"number":2}
)| Name | Type | Description |
|---|---|---|
assistant_id* | str | Assistant to update. |
graph_id | str | None | Default: NoneThe ID of the graph the assistant should use.
The graph ID is normally set in your langgraph.json configuration. If |
config | Config | None | Default: NoneConfiguration to use for the graph. |
context | Context | None | Default: NoneStatic context to add to the assistant. |
metadata | Json | Default: NoneMetadata to merge with existing assistant metadata. |
name | str | None | Default: NoneThe new name for the assistant. |
headers | Mapping[str, str] | None | Default: NoneOptional custom headers to include with the request. |
description | str | None | Default: NoneOptional description of the assistant. The description field is available for langgraph-api server version>=0.0.45 |
params | QueryParamTypes | None | Default: NoneOptional query parameters to include with the request. |