From 8c66caed1b8d75b9375e109656e4bbaefaf6eb76 Mon Sep 17 00:00:00 2001 From: Markus Ecker Date: Tue, 18 Mar 2025 17:38:30 +0100 Subject: [PATCH] dump from state_as_dict when state is a pydantic model --- sdk-python/copilotkit/crewai/crewai_sdk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk-python/copilotkit/crewai/crewai_sdk.py b/sdk-python/copilotkit/crewai/crewai_sdk.py index d587ee2232..fb5acb6280 100644 --- a/sdk-python/copilotkit/crewai/crewai_sdk.py +++ b/sdk-python/copilotkit/crewai/crewai_sdk.py @@ -156,7 +156,7 @@ async def copilotkit_emit_state(state: Any) -> Literal[True]: run_id=execution["run_id"], active=True, role="assistant", - state=json.dumps(state), + state=json.dumps(state_as_dict), running=True ) )