Python: [BREAKING] added SerializationMixin and applied to contents, agents, chat client… (#1012)

* added SerializationMixin and applied to contents, agents, chat clients, removed AFBaseModel

* fix annotations type

* mypy fixes

* fix tests

* fix serializable subvalues and added large docstring

* updated indents in code block

* fixed exported urls
This commit is contained in:
Eduard van Valkenburg
2025-09-30 19:53:46 +00:00
committed by GitHub
parent 3eb26632ce
commit 54ad135914
84 changed files with 2302 additions and 1957 deletions
@@ -38,7 +38,7 @@ async def non_streaming_example() -> None:
agent = OpenAIChatClient(
api_key=os.getenv("ANTHROPIC_API_KEY"),
base_url="https://api.anthropic.com/v1/",
ai_model_id=os.getenv("ANTHROPIC_MODEL"),
model_id=os.getenv("ANTHROPIC_MODEL"),
).create_agent(
name="WeatherAgent",
instructions="You are a helpful weather agent.",
@@ -58,7 +58,7 @@ async def streaming_example() -> None:
agent = OpenAIChatClient(
api_key=os.getenv("ANTHROPIC_API_KEY"),
base_url="https://api.anthropic.com/v1/",
ai_model_id=os.getenv("ANTHROPIC_MODEL"),
model_id=os.getenv("ANTHROPIC_MODEL"),
).create_agent(
name="WeatherAgent",
instructions="You are a helpful weather agent.",