renamed all (#3207)

This commit is contained in:
Eduard van Valkenburg
2026-01-14 06:54:07 +01:00
committed by GitHub
Unverified
parent 1ae0b09e42
commit d8cf8361bd
125 changed files with 1024 additions and 1027 deletions
@@ -5,8 +5,8 @@ from typing import Any, ClassVar
from agent_framework import (
AgentMiddlewareTypes,
AgentRunResponse,
AgentRunResponseUpdate,
AgentResponse,
AgentResponseUpdate,
AgentThread,
BaseAgent,
ChatMessage,
@@ -210,15 +210,15 @@ class CopilotStudioAgent(BaseAgent):
*,
thread: AgentThread | None = None,
**kwargs: Any,
) -> AgentRunResponse:
) -> AgentResponse:
"""Get a response from the agent.
This method returns the final result of the agent's execution
as a single AgentRunResponse object. The caller is blocked until
as a single AgentResponse object. The caller is blocked until
the final result is available.
Note: For streaming responses, use the run_stream method, which returns
intermediate steps and the final result as a stream of AgentRunResponseUpdate
intermediate steps and the final result as a stream of AgentResponseUpdate
objects. Streaming only the final result is not feasible because the timing of
the final result's availability is unknown, and blocking the caller until then
is undesirable in streaming scenarios.
@@ -248,7 +248,7 @@ class CopilotStudioAgent(BaseAgent):
response_messages = [message async for message in self._process_activities(activities, streaming=False)]
response_id = response_messages[0].message_id if response_messages else None
return AgentRunResponse(messages=response_messages, response_id=response_id)
return AgentResponse(messages=response_messages, response_id=response_id)
async def run_stream(
self,
@@ -256,13 +256,13 @@ class CopilotStudioAgent(BaseAgent):
*,
thread: AgentThread | None = None,
**kwargs: Any,
) -> AsyncIterable[AgentRunResponseUpdate]:
) -> AsyncIterable[AgentResponseUpdate]:
"""Run the agent as a stream.
This method will return the intermediate steps and final results of the
agent's execution as a stream of AgentRunResponseUpdate objects to the caller.
agent's execution as a stream of AgentResponseUpdate objects to the caller.
Note: An AgentRunResponseUpdate object contains a chunk of a message.
Note: An AgentResponseUpdate object contains a chunk of a message.
Args:
messages: The message(s) to send to the agent.
@@ -285,7 +285,7 @@ class CopilotStudioAgent(BaseAgent):
activities = self.client.ask_question(question, thread.service_thread_id)
async for message in self._process_activities(activities, streaming=True):
yield AgentRunResponseUpdate(
yield AgentResponseUpdate(
role=message.role,
contents=message.contents,
author_name=message.author_name,