File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 11
11
* Tool integration of tavily.com.
12
12
*/
13
13
#[AsTool('tavily_search ' , description: 'search for information on the internet ' , method: 'search ' )]
14
- #[AsTool('tavily_extract ' , description: 'fetch content from a website ' , method: 'extract ' )]
14
+ #[AsTool('tavily_extract ' , description: 'fetch content from websites ' , method: 'extract ' )]
15
15
final readonly class Tavily
16
16
{
17
17
/**
@@ -40,15 +40,13 @@ public function search(string $query): string
40
40
}
41
41
42
42
/**
43
- * TODO: Support list of URLs.
44
- *
45
- * @param string $url URL to fetch information from
43
+ * @param string[] $urls URLs to fetch information from
46
44
*/
47
- public function extract (string $ url ): string
45
+ public function extract (array $ urls ): string
48
46
{
49
47
$ response = $ this ->httpClient ->request ('POST ' , 'https://api.tavily.com/extract ' , [
50
48
'json ' => [
51
- 'urls ' => [ $ url ] ,
49
+ 'urls ' => $ urls ,
52
50
'api_key ' => $ this ->apiKey ,
53
51
],
54
52
]);
You can’t perform that action at this time.
0 commit comments