mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: OpenAI Responses Agent - threads, code interpreter, bug fixes and examples (#242)
* Added basic example with small fix * Added example with function tools * Added example with thread management * Small renaming * Added example with code interpreter
This commit is contained in:
committed by
GitHub
Unverified
parent
190035bb69
commit
c794892d79
@@ -33,7 +33,7 @@ def get_code_interpreter_chunk(chunk: AgentRunResponseUpdate) -> str | None:
|
||||
|
||||
async def main() -> None:
|
||||
"""Example showing how to use the HostedCodeInterpreterTool with Foundry."""
|
||||
print("=== Foundry Chat Client with Code Interpreter Example ===")
|
||||
print("=== Foundry Agent with Code Interpreter Example ===")
|
||||
|
||||
async with ChatClientAgent(
|
||||
chat_client=FoundryChatClient(),
|
||||
|
||||
@@ -60,7 +60,7 @@ async def example_with_thread_persistence() -> None:
|
||||
print(f"Agent: {result1.text}")
|
||||
|
||||
# Second conversation using the same thread - maintains context
|
||||
query2 = "How about comparing it to London?"
|
||||
query2 = "How about London?"
|
||||
print(f"\nUser: {query2}")
|
||||
result2 = await agent.run(query2, thread=thread)
|
||||
print(f"Agent: {result2.text}")
|
||||
|
||||
Reference in New Issue
Block a user