mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Added fixes and more examples for OpenAI and Azure chat client agents (#232)
* Added non-streaming and streaming examples * Updated resource management * Added examples with thread management * Added function tools examples * Small rename * Added code interpreter example * Updated example * Addressed PR feedback * Added more OpenAI and Azure chat completion examples * File renaming * Small fix in tests * Small revert * More renaming * Small fix
This commit is contained in:
committed by
GitHub
Unverified
parent
14efb626ab
commit
a72245287f
@@ -47,7 +47,7 @@ async def streaming_example() -> None:
|
||||
) as agent:
|
||||
query = "What's the weather like in Portland?"
|
||||
print(f"User: {query}")
|
||||
print("Assistant: ", end="", flush=True)
|
||||
print("Agent: ", end="", flush=True)
|
||||
async for chunk in agent.run_stream(query):
|
||||
if chunk.text:
|
||||
print(chunk.text, end="", flush=True)
|
||||
@@ -55,7 +55,7 @@ async def streaming_example() -> None:
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
print("=== Basic Foundry Chat Client Example ===")
|
||||
print("=== Basic Foundry Chat Client Agent Example ===")
|
||||
|
||||
await non_streaming_example()
|
||||
await streaming_example()
|
||||
|
||||
Reference in New Issue
Block a user