mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
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:
committed by
GitHub
Unverified
parent
3eb26632ce
commit
54ad135914
@@ -5,7 +5,7 @@ import json
|
||||
import re
|
||||
import uuid
|
||||
from collections.abc import AsyncIterable, Sequence
|
||||
from typing import Any
|
||||
from typing import Any, cast
|
||||
|
||||
import httpx
|
||||
from a2a.client import Client, ClientConfig, ClientFactory, minimal_agent_card
|
||||
@@ -307,7 +307,7 @@ class A2AAgent(BaseAgent):
|
||||
role=A2ARole("user"),
|
||||
parts=parts,
|
||||
message_id=message.message_id or uuid.uuid4().hex,
|
||||
metadata=message.additional_properties,
|
||||
metadata=cast(dict[str, Any], message.additional_properties),
|
||||
)
|
||||
|
||||
def _a2a_parts_to_contents(self, parts: Sequence[A2APart]) -> list[Contents]:
|
||||
|
||||
Reference in New Issue
Block a user