mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [BREAKING] simplify ag-ui run logic, fix mcp bugs, fix anthropic client issues in ag-ui (#3322)
* Refactor ag-ui to simplify flow * Refactoring * Fix backend tool * Update tests * Improvements * Fix mypy * Fixes * Fix json serialize errors
This commit is contained in:
committed by
GitHub
Unverified
parent
9f893a32a6
commit
5436354a83
@@ -146,6 +146,7 @@ class AnthropicChatOptions(ChatOptions, total=False):
|
||||
frequency_penalty: None # type: ignore[misc]
|
||||
presence_penalty: None # type: ignore[misc]
|
||||
store: None # type: ignore[misc]
|
||||
conversation_id: None # type: ignore[misc]
|
||||
|
||||
|
||||
TAnthropicOptions = TypeVar(
|
||||
@@ -513,7 +514,9 @@ class AnthropicClient(BaseChatClient[TAnthropicOptions], Generic[TAnthropicOptio
|
||||
for content in message.contents:
|
||||
match content.type:
|
||||
case "text":
|
||||
a_content.append({"type": "text", "text": content.text})
|
||||
# Skip empty text content blocks - Anthropic API rejects them
|
||||
if content.text:
|
||||
a_content.append({"type": "text", "text": content.text})
|
||||
case "data":
|
||||
if content.has_top_level_media_type("image"):
|
||||
a_content.append({
|
||||
|
||||
Reference in New Issue
Block a user