mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Fixed middleware and multimodal input samples (#4022)
* Fix streaming branch in weather override middleware sample The streaming branch of weather_override_middleware only prefixed the original weather data via a transform hook instead of replacing the content with the 'perfect weather' override like the non-streaming branch does. Replace with a new ResponseStream that yields the override content as ChatResponseUpdate chunks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fixed exception handling middleware sample * Fixed runtime context delegation middleware example * Fixed multimodal input examples * Small update --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
df58775d64
commit
2dd731f90f
@@ -47,8 +47,8 @@ async def exception_handling_middleware(
|
||||
print(f"[ExceptionHandlingMiddleware] Caught TimeoutError: {e}")
|
||||
# Override function result to provide custom message in response.
|
||||
context.result = (
|
||||
"Request Timeout: The data service is taking longer than expected to respond.",
|
||||
"Respond with message - 'Sorry for the inconvenience, please try again later.'",
|
||||
"Request Timeout: The data service is taking longer than expected to respond."
|
||||
"Respond with message - 'Sorry for the inconvenience, please try again later.'"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user