File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public function __invoke(string $searchTerm): string
45
45
$ vectors = $ this ->platform ->request ($ this ->model , $ searchTerm )->getContent ();
46
46
$ this ->usedDocuments = $ this ->vectorStore ->query ($ vectors [0 ]);
47
47
48
- if (0 === \count ( $ this ->usedDocuments ) ) {
48
+ if ([] === $ this ->usedDocuments ) {
49
49
return 'No results found ' ;
50
50
}
51
51
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public function search(string $query): string
41
41
42
42
$ titles = array_map (fn (array $ item ) => $ item ['title ' ], $ result ['query ' ]['search ' ]);
43
43
44
- if (0 === \count ( $ titles) ) {
44
+ if ([] === $ titles ) {
45
45
return 'No articles were found on Wikipedia. ' ;
46
46
}
47
47
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public function getTool(string $reference): iterable
33
33
$ reflectionClass = new \ReflectionClass ($ reference );
34
34
$ attributes = $ reflectionClass ->getAttributes (AsTool::class);
35
35
36
- if (0 === \count ( $ attributes) ) {
36
+ if ([] === $ attributes ) {
37
37
throw ToolException::missingAttribute ($ reference );
38
38
}
39
39
You can’t perform that action at this time.
0 commit comments