mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Add missing system instruction attr to invoke_agent span (#4012)
* Add missing sysmte instruction attr to invoke_agent span * Temp remove azure search gate * fix pipeline error
This commit is contained in:
@@ -43,9 +43,11 @@ from anthropic.types.beta import (
|
||||
from anthropic.types.beta.beta_bash_code_execution_tool_result_error import (
|
||||
BetaBashCodeExecutionToolResultError,
|
||||
)
|
||||
from anthropic.types.beta.beta_code_execution_result_block import BetaCodeExecutionResultBlock
|
||||
from anthropic.types.beta.beta_code_execution_tool_result_error import (
|
||||
BetaCodeExecutionToolResultError,
|
||||
)
|
||||
from anthropic.types.beta.beta_encrypted_code_execution_result_block import BetaEncryptedCodeExecutionResultBlock
|
||||
from pydantic import BaseModel
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
@@ -938,13 +940,26 @@ class AnthropicClient(
|
||||
)
|
||||
)
|
||||
else:
|
||||
if content_block.content.stdout:
|
||||
if (
|
||||
isinstance(content_block.content, BetaCodeExecutionResultBlock)
|
||||
and content_block.content.stdout
|
||||
):
|
||||
code_outputs.append(
|
||||
Content.from_text(
|
||||
text=content_block.content.stdout,
|
||||
raw_representation=content_block.content,
|
||||
)
|
||||
)
|
||||
if (
|
||||
isinstance(content_block.content, BetaEncryptedCodeExecutionResultBlock)
|
||||
and content_block.content.encrypted_stdout
|
||||
):
|
||||
code_outputs.append(
|
||||
Content.from_text(
|
||||
text=content_block.content.encrypted_stdout,
|
||||
raw_representation=content_block.content,
|
||||
)
|
||||
)
|
||||
if content_block.content.stderr:
|
||||
code_outputs.append(
|
||||
Content.from_error(
|
||||
|
||||
Reference in New Issue
Block a user