mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
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:
committed by
GitHub
Unverified
parent
73761aa4a3
commit
83e6229c11
@@ -50,11 +50,9 @@ async def main():
|
||||
print("\nAssistant: ", end="", flush=True)
|
||||
|
||||
# Display text content as it streams
|
||||
from agent_framework import TextContent
|
||||
|
||||
for content in update.contents:
|
||||
if isinstance(content, TextContent) and content.text:
|
||||
print(f"\033[96m{content.text}\033[0m", end="", flush=True)
|
||||
if hasattr(content, "text") and content.text: # type: ignore[attr-defined]
|
||||
print(f"\033[96m{content.text}\033[0m", end="", flush=True) # type: ignore[attr-defined]
|
||||
|
||||
# Display finish reason if present
|
||||
if update.finish_reason:
|
||||
|
||||
Reference in New Issue
Block a user