mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [BREAKING] Renamed AgentProtocol to SupportsAgentRun (#3717)
* Renamed AgentProtocol to AgentLike * Resolved comments * Renamed AgentLike to SupportsAgentRun * Resolved comments
This commit is contained in:
committed by
GitHub
Unverified
parent
ac17adb595
commit
15256bb616
@@ -757,11 +757,11 @@ class EntityDiscovery:
|
||||
True if object appears to be a valid agent
|
||||
"""
|
||||
try:
|
||||
# Try to import AgentProtocol for proper type checking
|
||||
# Try to import SupportsAgentRun for proper type checking
|
||||
try:
|
||||
from agent_framework import AgentProtocol
|
||||
from agent_framework import SupportsAgentRun
|
||||
|
||||
if isinstance(obj, AgentProtocol):
|
||||
if isinstance(obj, SupportsAgentRun):
|
||||
return True
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -7,7 +7,7 @@ import logging
|
||||
from collections.abc import AsyncGenerator
|
||||
from typing import Any
|
||||
|
||||
from agent_framework import AgentProtocol, Content, Workflow
|
||||
from agent_framework import Content, SupportsAgentRun, Workflow
|
||||
|
||||
from ._conversations import ConversationStore, InMemoryConversationStore
|
||||
from ._discovery import EntityDiscovery
|
||||
@@ -285,7 +285,7 @@ class AgentFrameworkExecutor:
|
||||
yield {"type": "error", "message": str(e), "entity_id": entity_id}
|
||||
|
||||
async def _execute_agent(
|
||||
self, agent: AgentProtocol, request: AgentFrameworkRequest, trace_collector: Any
|
||||
self, agent: SupportsAgentRun, request: AgentFrameworkRequest, trace_collector: Any
|
||||
) -> AsyncGenerator[Any, None]:
|
||||
"""Execute Agent Framework agent with trace collection and optional thread support.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user