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
@@ -229,12 +229,12 @@ async def test_chat_client_agent_get_new_thread(chat_client: ChatClient) -> None
|
||||
|
||||
async def test_chat_client_agent_prepare_thread_and_messages(chat_client: ChatClient) -> None:
|
||||
agent = ChatClientAgent(chat_client=chat_client)
|
||||
message = ChatMessage(role=ChatRole.USER, contents=[TextContent("Hello")])
|
||||
message = ChatMessage(role=ChatRole.USER, text="Hello")
|
||||
thread = ChatClientAgentThread(messages=[message])
|
||||
|
||||
result_thread, result_messages = await agent._prepare_thread_and_messages( # type: ignore[reportPrivateUsage]
|
||||
thread=thread,
|
||||
input_messages="Test",
|
||||
input_messages=[ChatMessage(role=ChatRole.USER, text="Test")],
|
||||
construct_thread=lambda: ChatClientAgentThread(),
|
||||
expected_type=ChatClientAgentThread,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user