mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-28 10:49:56 +02:00
fix(sdk-py): allow reset of config/context in assistants update (#6862)
This distinguishes an empty `config`/`context` (`{}`) from a null
`config`/`context`, and therefore allows resetting these fields.
(Easiest to test this E2E on the server side; will create a separate PR
for that.)
This commit is contained in:
@@ -425,9 +425,9 @@ class AssistantsClient:
|
||||
payload: dict[str, Any] = {}
|
||||
if graph_id:
|
||||
payload["graph_id"] = graph_id
|
||||
if config:
|
||||
if config is not None:
|
||||
payload["config"] = config
|
||||
if context:
|
||||
if context is not None:
|
||||
payload["context"] = context
|
||||
if metadata:
|
||||
payload["metadata"] = metadata
|
||||
|
||||
@@ -427,9 +427,9 @@ class SyncAssistantsClient:
|
||||
payload: dict[str, Any] = {}
|
||||
if graph_id:
|
||||
payload["graph_id"] = graph_id
|
||||
if config:
|
||||
if config is not None:
|
||||
payload["config"] = config
|
||||
if context:
|
||||
if context is not None:
|
||||
payload["context"] = context
|
||||
if metadata:
|
||||
payload["metadata"] = metadata
|
||||
|
||||
Reference in New Issue
Block a user