mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
renamed all (#3207)
This commit is contained in:
committed by
GitHub
Unverified
parent
1ae0b09e42
commit
d8cf8361bd
@@ -62,7 +62,7 @@ graph TB
|
||||
AttStore -.->|save metadata| SQLite
|
||||
|
||||
Converter -->|ChatMessage array| Agent
|
||||
Agent -->|AgentRunResponseUpdate| Streamer
|
||||
Agent -->|AgentResponseUpdate| Streamer
|
||||
Streamer -->|ThreadStreamEvent| ChatKit
|
||||
|
||||
ChatKit --> Widgets
|
||||
|
||||
@@ -18,7 +18,7 @@ from typing import Annotated, Any
|
||||
import uvicorn
|
||||
|
||||
# Agent Framework imports
|
||||
from agent_framework import AgentRunResponseUpdate, ChatAgent, ChatMessage, FunctionResultContent, Role
|
||||
from agent_framework import AgentResponseUpdate, ChatAgent, ChatMessage, FunctionResultContent, Role
|
||||
from agent_framework.azure import AzureOpenAIChatClient
|
||||
|
||||
# Agent Framework ChatKit integration
|
||||
@@ -365,7 +365,7 @@ class WeatherChatKitServer(ChatKitServer[dict[str, Any]]):
|
||||
agent_stream = self.weather_agent.run_stream(agent_messages)
|
||||
|
||||
# Create an intercepting stream that extracts function results while passing through updates
|
||||
async def intercept_stream() -> AsyncIterator[AgentRunResponseUpdate]:
|
||||
async def intercept_stream() -> AsyncIterator[AgentResponseUpdate]:
|
||||
nonlocal weather_data, show_city_selector
|
||||
async for update in agent_stream:
|
||||
# Check for function results in the update
|
||||
@@ -462,7 +462,7 @@ class WeatherChatKitServer(ChatKitServer[dict[str, Any]]):
|
||||
agent_stream = self.weather_agent.run_stream(agent_messages)
|
||||
|
||||
# Create an intercepting stream that extracts function results while passing through updates
|
||||
async def intercept_stream() -> AsyncIterator[AgentRunResponseUpdate]:
|
||||
async def intercept_stream() -> AsyncIterator[AgentResponseUpdate]:
|
||||
nonlocal weather_data
|
||||
async for update in agent_stream:
|
||||
# Check for function results in the update
|
||||
|
||||
@@ -47,7 +47,7 @@ from _tools import (
|
||||
)
|
||||
from agent_framework import (
|
||||
AgentExecutorResponse,
|
||||
AgentRunResponseUpdate,
|
||||
AgentResponseUpdate,
|
||||
AgentRunUpdateEvent,
|
||||
ChatMessage,
|
||||
Executor,
|
||||
@@ -133,8 +133,8 @@ class ResearchLead(Executor):
|
||||
|
||||
for response in responses:
|
||||
findings = []
|
||||
if response.agent_run_response and response.agent_run_response.messages:
|
||||
for msg in response.agent_run_response.messages:
|
||||
if response.agent_response and response.agent_response.messages:
|
||||
for msg in response.agent_response.messages:
|
||||
if msg.role == Role.ASSISTANT and msg.text and msg.text.strip():
|
||||
findings.append(msg.text.strip())
|
||||
|
||||
@@ -373,7 +373,7 @@ async def _process_workflow_events(events, conversation_ids, response_ids):
|
||||
|
||||
def _track_agent_ids(event, agent, response_ids, conversation_ids):
|
||||
"""Track agent response and conversation IDs - supporting multiple responses per agent."""
|
||||
if isinstance(event.data, AgentRunResponseUpdate):
|
||||
if isinstance(event.data, AgentResponseUpdate):
|
||||
# Check for conversation_id and response_id from raw_representation
|
||||
# V2 API stores conversation_id directly on raw_representation (ChatResponseUpdate)
|
||||
if hasattr(event.data, "raw_representation") and event.data.raw_representation:
|
||||
|
||||
Reference in New Issue
Block a user