mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Azure OpenAI Assistants Chat Client and Agent (#300)
* Initial version of assistant client
* More updates to assistant client
* Finished assistant chat client implementation
* Small fixes and basic example
* Added code interpreter example
* More examples
* Added chat client example
* Small fixes
* Added tests
* Enabled telemetry
* Small fix
* Removed files temporarily
* Revert "Removed files temporarily"
This reverts commit 5cdfa0d299.
* Small fixes
* Addressed PR feedback
* Fixed tests
* Small update
* Added Azure assistants client and examples
* Added tests
* Small fix
This commit is contained in:
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
import asyncio
|
||||
|
||||
from agent_framework import AgentRunResponseUpdate, ChatClientAgent, HostedCodeInterpreterTool
|
||||
from agent_framework import AgentRunResponseUpdate, ChatClientAgent, ChatResponseUpdate, HostedCodeInterpreterTool
|
||||
from agent_framework.openai import OpenAIAssistantsClient
|
||||
from openai.types.beta.threads.runs import (
|
||||
CodeInterpreterToolCallDelta,
|
||||
@@ -16,7 +16,7 @@ from openai.types.beta.threads.runs.code_interpreter_tool_call_delta import Code
|
||||
def get_code_interpreter_chunk(chunk: AgentRunResponseUpdate) -> str | None:
|
||||
"""Helper method to access code interpreter data."""
|
||||
if (
|
||||
isinstance(chunk.raw_representation, AgentRunResponseUpdate)
|
||||
isinstance(chunk.raw_representation, ChatResponseUpdate)
|
||||
and isinstance(chunk.raw_representation.raw_representation, RunStepDeltaEvent)
|
||||
and isinstance(chunk.raw_representation.raw_representation.delta, RunStepDelta)
|
||||
and isinstance(chunk.raw_representation.raw_representation.delta.step_details, ToolCallDeltaObject)
|
||||
|
||||
Reference in New Issue
Block a user