@@ -72,6 +72,7 @@ public static function normalizeDataProvider(): iterable
72
72
new AssistantMessage ('Hello ' ),
73
73
[
74
74
'role ' => Role::Assistant,
75
+ 'content ' => 'Hello ' ,
75
76
'tool_calls ' => [],
76
77
],
77
78
];
@@ -80,6 +81,7 @@ public static function normalizeDataProvider(): iterable
80
81
new AssistantMessage (toolCalls: [new ToolCall ('id1 ' , 'function1 ' , ['param ' => 'value ' ])]),
81
82
[
82
83
'role ' => Role::Assistant,
84
+ 'content ' => '' ,
83
85
'tool_calls ' => [
84
86
[
85
87
'type ' => 'function ' ,
@@ -96,6 +98,7 @@ public static function normalizeDataProvider(): iterable
96
98
new AssistantMessage (toolCalls: [new ToolCall ('id1 ' , 'function1 ' , [])]),
97
99
[
98
100
'role ' => Role::Assistant,
101
+ 'content ' => '' ,
99
102
'tool_calls ' => [
100
103
[
101
104
'type ' => 'function ' ,
@@ -115,6 +118,37 @@ public static function normalizeDataProvider(): iterable
115
118
]),
116
119
[
117
120
'role ' => Role::Assistant,
121
+ 'content ' => '' ,
122
+ 'tool_calls ' => [
123
+ [
124
+ 'type ' => 'function ' ,
125
+ 'function ' => [
126
+ 'name ' => 'function1 ' ,
127
+ 'arguments ' => ['param1 ' => 'value1 ' ],
128
+ ],
129
+ ],
130
+ [
131
+ 'type ' => 'function ' ,
132
+ 'function ' => [
133
+ 'name ' => 'function2 ' ,
134
+ 'arguments ' => ['param2 ' => 'value2 ' ],
135
+ ],
136
+ ],
137
+ ],
138
+ ],
139
+ ];
140
+
141
+ yield 'assistant message with tool calls and content ' => [
142
+ new AssistantMessage (
143
+ content: 'Hello ' ,
144
+ toolCalls: [
145
+ new ToolCall ('id1 ' , 'function1 ' , ['param1 ' => 'value1 ' ]),
146
+ new ToolCall ('id2 ' , 'function2 ' , ['param2 ' => 'value2 ' ]),
147
+ ]
148
+ ),
149
+ [
150
+ 'role ' => Role::Assistant,
151
+ 'content ' => 'Hello ' ,
118
152
'tool_calls ' => [
119
153
[
120
154
'type ' => 'function ' ,
0 commit comments