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:
@@ -9,7 +9,7 @@ from azure.identity import AzureCliCredential
|
||||
|
||||
def create_sample_image() -> str:
|
||||
"""Create a simple 1x1 pixel PNG image for testing."""
|
||||
# This is a tiny red pixel in PNG format
|
||||
# This is a tiny yellow pixel in PNG format
|
||||
png_data = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="
|
||||
return f"data:image/png;base64,{png_data}"
|
||||
|
||||
@@ -32,7 +32,7 @@ async def test_image() -> None:
|
||||
],
|
||||
)
|
||||
|
||||
response = await client.get_response(message)
|
||||
response = await client.get_response([message])
|
||||
print(f"Image Response: {response}")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user