1616use PhpLlm \LlmChain \Tests \Fixture \Tool \ToolNoParams ;
1717use PhpLlm \LlmChain \Tests \Fixture \Tool \ToolOptionalParam ;
1818use PhpLlm \LlmChain \Tests \Fixture \Tool \ToolRequiredParams ;
19- use PhpLlm \LlmChain \Tests \Fixture \Tool \ToolReturningArray ;
20- use PhpLlm \LlmChain \Tests \Fixture \Tool \ToolReturningFloat ;
21- use PhpLlm \LlmChain \Tests \Fixture \Tool \ToolReturningInteger ;
22- use PhpLlm \LlmChain \Tests \Fixture \Tool \ToolReturningJsonSerializable ;
23- use PhpLlm \LlmChain \Tests \Fixture \Tool \ToolReturningStringable ;
2419use PHPUnit \Framework \Attributes \CoversClass ;
2520use PHPUnit \Framework \Attributes \DataProvider ;
2621use PHPUnit \Framework \Attributes \Test ;
@@ -43,11 +38,6 @@ protected function setUp(): void
4338 new ToolRequiredParams (),
4439 new ToolOptionalParam (),
4540 new ToolNoParams (),
46- new ToolReturningArray (),
47- new ToolReturningJsonSerializable (),
48- new ToolReturningInteger (),
49- new ToolReturningFloat (),
50- new ToolReturningStringable (),
5141 new ToolException (),
5242 ]);
5343 }
@@ -111,41 +101,6 @@ public function toolsMap(): void
111101 'description ' => 'A tool without parameters ' ,
112102 ],
113103 ],
114- [
115- 'type ' => 'function ' ,
116- 'function ' => [
117- 'name ' => 'tool_returning_array ' ,
118- 'description ' => 'A tool returning an array ' ,
119- ],
120- ],
121- [
122- 'type ' => 'function ' ,
123- 'function ' => [
124- 'name ' => 'tool_returning_json_serializable ' ,
125- 'description ' => 'A tool returning an object which implements \JsonSerializable ' ,
126- ],
127- ],
128- [
129- 'type ' => 'function ' ,
130- 'function ' => [
131- 'name ' => 'tool_returning_integer ' ,
132- 'description ' => 'A tool returning an integer ' ,
133- ],
134- ],
135- [
136- 'type ' => 'function ' ,
137- 'function ' => [
138- 'name ' => 'tool_returning_float ' ,
139- 'description ' => 'A tool returning a float ' ,
140- ],
141- ],
142- [
143- 'type ' => 'function ' ,
144- 'function ' => [
145- 'name ' => 'tool_returning_stringable ' ,
146- 'description ' => 'A tool returning an object which implements \Stringable ' ,
147- ],
148- ],
149104 [
150105 'type ' => 'function ' ,
151106 'function ' => [
@@ -207,30 +162,5 @@ public static function executeProvider(): iterable
207162 'tool_required_params ' ,
208163 ['text ' => 'Hello ' , 'number ' => 3 ],
209164 ];
210-
211- yield 'tool_returning_array ' => [
212- '{"foo":"bar"} ' ,
213- 'tool_returning_array ' ,
214- ];
215-
216- yield 'tool_returning_json_serializable ' => [
217- '{"foo":"bar"} ' ,
218- 'tool_returning_json_serializable ' ,
219- ];
220-
221- yield 'tool_returning_integer ' => [
222- '42 ' ,
223- 'tool_returning_integer ' ,
224- ];
225-
226- yield 'tool_returning_float ' => [
227- '42.42 ' ,
228- 'tool_returning_float ' ,
229- ];
230-
231- yield 'tool_returning_stringable ' => [
232- 'Hi! ' ,
233- 'tool_returning_stringable ' ,
234- ];
235165 }
236166}
0 commit comments