mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
[BREAKING] Python: Merge send_responses into run method (#3720)
* Streamline workflow run api with send responses in one method * Fixes * Address copilot feedback
This commit is contained in:
committed by
GitHub
Unverified
parent
15256bb616
commit
a17f13598b
@@ -251,7 +251,7 @@ async def main() -> None:
|
||||
# Continue workflow with user response
|
||||
print(f"\n{YELLOW}WORKFLOW:{RESET} Restore\n")
|
||||
response = AgentExternalInputResponse(user_input=user_input)
|
||||
stream = workflow.send_responses_streaming({pending_request_id: response})
|
||||
stream = workflow.run(stream=True, responses={pending_request_id: response})
|
||||
pending_request_id = None
|
||||
else:
|
||||
# Start workflow
|
||||
|
||||
@@ -90,7 +90,7 @@ async def main():
|
||||
while True:
|
||||
if pending_request_id:
|
||||
response = ExternalInputResponse(user_input=user_input)
|
||||
stream = workflow.send_responses_streaming({pending_request_id: response})
|
||||
stream = workflow.run(stream=True, responses={pending_request_id: response})
|
||||
else:
|
||||
stream = workflow.run({"userInput": user_input}, stream=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user