A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix: ai endpoints from msgspec migration (#6273)
Myles Scolnick2d322b2a366b
diff --git a/marimo/_ai/_convert.py b/marimo/_ai/_convert.pyindex 260675f727..1de547d4e8 100644--- a/marimo/_ai/_convert.py+++ b/marimo/_ai/_convert.py@@ -2,9 +2,9 @@from __future__ import annotationsimport base64+import dataclassesimport jsonimport uuid-from dataclasses import asdictfrom typing import TYPE_CHECKING, Any, Literal, Optional, Union, castfrom marimo._ai._types import (@@ -109,7 +109,10 @@ def convert_to_openai_messages(f"Unsupported content type {part.media_type}")else:- parts.append(asdict(part))+ if dataclasses.is_dataclass(part):+ parts.append(dataclasses.asdict(part))+ else:+ parts.append(cast(dict[str, Any], part))openai_messages.append({"role": message.role, "content": parts})