[BREAKING] Python: Remove request_type param from ctx.request_info() (#1824)

* Remove request_type param from ctx.request_info()

* Address comments
This commit is contained in:
Tao Chen
2025-10-31 07:31:15 -07:00
committed by GitHub
Unverified
parent 2101d9d36d
commit 68b6a55757
21 changed files with 72 additions and 48 deletions
@@ -128,9 +128,8 @@ class Coordinator(Executor):
"Keep it under 30 words."
)
await ctx.request_info(
DraftFeedbackRequest(prompt=prompt, draft_text=draft_text, conversation=conversation),
DraftFeedbackRequest,
str,
request_data=DraftFeedbackRequest(prompt=prompt, draft_text=draft_text, conversation=conversation),
response_type=str,
)
@response_handler
@@ -76,7 +76,7 @@ class ReviewerWithHumanInTheLoop(Executor):
print("Reviewer: Escalating to human manager...")
# Forward the request to a human manager by sending a HumanReviewRequest.
await ctx.request_info(HumanReviewRequest(agent_request=request), HumanReviewRequest, ReviewResponse)
await ctx.request_info(request_data=HumanReviewRequest(agent_request=request), response_type=ReviewResponse)
@response_handler
async def accept_human_review(