mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: added AIAnnotation types and extra tests (#374)
* added AIAnnotation types and extra tests * fixed typing and such * use copy * fix raw representation for add * handle annotations in add * clarified concat * self to first
This commit is contained in:
committed by
GitHub
Unverified
parent
8f27e63df6
commit
82d39bc1f7
@@ -177,11 +177,11 @@ class OpenAIChatClientBase(OpenAIHandler, ChatClientBase):
|
||||
content = choice.message if isinstance(choice, Choice) else choice.delta
|
||||
if content and (tool_calls := getattr(content, "tool_calls", None)) is not None:
|
||||
for tool in cast(list[ChatCompletionMessageToolCall] | list[ChoiceDeltaToolCall], tool_calls):
|
||||
if tool.function:
|
||||
if tool.function: # type: ignore[reportAttributeAccessIssue, union-attr]
|
||||
fcc = FunctionCallContent(
|
||||
call_id=tool.id if tool.id else "",
|
||||
name=tool.function.name if tool.function.name else "",
|
||||
arguments=tool.function.arguments if tool.function.arguments else "",
|
||||
name=tool.function.name if tool.function.name else "", # type: ignore
|
||||
arguments=tool.function.arguments if tool.function.arguments else "", # type: ignore
|
||||
)
|
||||
resp.append(fcc)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user