Python: [Breaking] Simplified Content types to a single class with classmethod constructors. (#3252)

* ported Content to a new model

* fixed linting

* fixes

* fixed data format handling

* fix for 3.10 mypy

* fix

* fix int test
This commit is contained in:
Eduard van Valkenburg
2026-01-20 23:09:39 +01:00
committed by GitHub
Unverified
parent 73761aa4a3
commit 83e6229c11
132 changed files with 3949 additions and 4741 deletions
@@ -10,9 +10,9 @@ from agent_framework import (
AgentThread,
BaseAgent,
ChatMessage,
Content,
ContextProvider,
Role,
TextContent,
normalize_messages,
)
from agent_framework._pydantic import AFBaseSettings
@@ -332,7 +332,7 @@ class CopilotStudioAgent(BaseAgent):
):
yield ChatMessage(
role=Role.ASSISTANT,
contents=[TextContent(activity.text)],
contents=[Content.from_text(activity.text)],
author_name=activity.from_property.name if activity.from_property else None,
message_id=activity.id,
raw_representation=activity,