mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
removed additional properties from messages sent to OAI responses and chat (#2344)
This commit is contained in:
committed by
GitHub
Unverified
parent
0781d4b459
commit
a7a0660cac
@@ -1973,6 +1973,7 @@ class ChatMessage(SerializationMixin):
|
||||
author_name: The name of the author of the message.
|
||||
message_id: The ID of the chat message.
|
||||
additional_properties: Any additional properties associated with the chat message.
|
||||
Additional properties are used within Agent Framework, they are not sent to services.
|
||||
raw_representation: The raw representation of the chat message from an underlying implementation.
|
||||
|
||||
Examples:
|
||||
@@ -2033,6 +2034,7 @@ class ChatMessage(SerializationMixin):
|
||||
author_name: Optional name of the author of the message.
|
||||
message_id: Optional ID of the chat message.
|
||||
additional_properties: Optional additional properties associated with the chat message.
|
||||
Additional properties are used within Agent Framework, they are not sent to services.
|
||||
raw_representation: Optional raw representation of the chat message.
|
||||
**kwargs: Additional keyword arguments.
|
||||
"""
|
||||
@@ -2059,6 +2061,7 @@ class ChatMessage(SerializationMixin):
|
||||
author_name: Optional name of the author of the message.
|
||||
message_id: Optional ID of the chat message.
|
||||
additional_properties: Optional additional properties associated with the chat message.
|
||||
Additional properties are used within Agent Framework, they are not sent to services.
|
||||
raw_representation: Optional raw representation of the chat message.
|
||||
**kwargs: Additional keyword arguments.
|
||||
"""
|
||||
@@ -2086,6 +2089,7 @@ class ChatMessage(SerializationMixin):
|
||||
author_name: Optional name of the author of the message.
|
||||
message_id: Optional ID of the chat message.
|
||||
additional_properties: Optional additional properties associated with the chat message.
|
||||
Additional properties are used within Agent Framework, they are not sent to services.
|
||||
raw_representation: Optional raw representation of the chat message.
|
||||
kwargs: will be combined with additional_properties if provided.
|
||||
"""
|
||||
|
||||
@@ -369,8 +369,6 @@ class OpenAIBaseChatClient(OpenAIBase, BaseChatClient):
|
||||
args: dict[str, Any] = {
|
||||
"role": message.role.value if isinstance(message.role, Role) else message.role,
|
||||
}
|
||||
if message.additional_properties:
|
||||
args["metadata"] = message.additional_properties
|
||||
match content:
|
||||
case FunctionCallContent():
|
||||
if all_messages and "tool_calls" in all_messages[-1]:
|
||||
|
||||
@@ -412,8 +412,6 @@ class OpenAIBaseResponsesClient(OpenAIBase, BaseChatClient):
|
||||
args: dict[str, Any] = {
|
||||
"role": message.role.value if isinstance(message.role, Role) else message.role,
|
||||
}
|
||||
if message.additional_properties:
|
||||
args["metadata"] = message.additional_properties
|
||||
for content in message.contents:
|
||||
match content:
|
||||
case TextReasoningContent():
|
||||
|
||||
Reference in New Issue
Block a user