mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [BREAKING] update to v1.0.0 (#5062)
* updates to final deprecated pieces and versions * fix mypy * fix readme links
This commit is contained in:
@@ -103,7 +103,8 @@ class Coordinator(Executor):
|
||||
# Human approved the draft as-is; forward it unchanged.
|
||||
await ctx.send_message(
|
||||
AgentExecutorRequest(
|
||||
messages=original_request.conversation + [Message("user", text="The draft is approved as-is.")],
|
||||
messages=original_request.conversation
|
||||
+ [Message("user", contents=["The draft is approved as-is."])],
|
||||
should_respond=True,
|
||||
),
|
||||
target_id=self.final_editor_name,
|
||||
@@ -118,7 +119,7 @@ class Coordinator(Executor):
|
||||
"Rewrite the draft from the previous assistant message into a polished final version. "
|
||||
"Keep the response under 120 words and reflect any requested tone adjustments."
|
||||
)
|
||||
conversation.append(Message("user", text=instruction))
|
||||
conversation.append(Message("user", contents=[instruction]))
|
||||
await ctx.send_message(
|
||||
AgentExecutorRequest(messages=conversation, should_respond=True),
|
||||
target_id=self.writer_name,
|
||||
|
||||
@@ -85,13 +85,15 @@ async def aggregate_with_synthesis(results: list[AgentExecutorResponse]) -> Any:
|
||||
|
||||
system_msg = Message(
|
||||
"system",
|
||||
text=(
|
||||
"You are a synthesis expert. Consolidate the following analyst perspectives "
|
||||
"into one cohesive, balanced summary (3-4 sentences). If human guidance is provided, "
|
||||
"prioritize aspects as directed."
|
||||
),
|
||||
contents=[
|
||||
(
|
||||
"You are a synthesis expert. Consolidate the following analyst perspectives "
|
||||
"into one cohesive, balanced summary (3-4 sentences). If human guidance is provided, "
|
||||
"prioritize aspects as directed."
|
||||
)
|
||||
],
|
||||
)
|
||||
user_msg = Message("user", text="\n\n".join(expert_sections) + guidance_text)
|
||||
user_msg = Message("user", contents=["\n\n".join(expert_sections) + guidance_text])
|
||||
|
||||
response = await _chat_client.get_response([system_msg, user_msg])
|
||||
return response.messages[-1].text if response.messages else ""
|
||||
|
||||
@@ -91,7 +91,7 @@ class TurnManager(Executor):
|
||||
- Input is a simple starter token (ignored here).
|
||||
- Output is an AgentExecutorRequest that triggers the agent to produce a guess.
|
||||
"""
|
||||
user = Message("user", text="Start by making your first guess.")
|
||||
user = Message("user", contents=["Start by making your first guess."])
|
||||
await ctx.send_message(AgentExecutorRequest(messages=[user], should_respond=True))
|
||||
|
||||
@handler
|
||||
@@ -150,7 +150,7 @@ class TurnManager(Executor):
|
||||
f"Feedback: {reply}. Your last guess was {last_guess}. "
|
||||
f"Use this feedback to adjust and make your next guess (1-10)."
|
||||
)
|
||||
user_msg = Message("user", text=feedback_text)
|
||||
user_msg = Message("user", contents=[feedback_text])
|
||||
await ctx.send_message(AgentExecutorRequest(messages=[user_msg], should_respond=True))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user