Brave 搜索
BraveSearchToolSpec #
基类:BaseToolSpec
Brave Search 工具规范。
源代码位于 llama-index-integrations/tools/llama-index-tools-brave-search/llama_index/tools/brave_search/base.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
brave_search #
brave_search(query: str, search_lang: str = 'en', num_results: int = 5) -> [Document]
向 Brave 搜索引擎发送查询以接收结果列表。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
query
|
str
|
要传递给 Brave Search 的查询。 |
必需 |
search_lang
|
str
|
搜索语言偏好(ISO 639-1),默认为“en”。 |
'en'
|
num_results
|
int
|
响应中返回的搜索结果数量,默认为 5。 |
5
|
返回值
类型 | 描述 |
---|---|
[文档]
|
[文档]:包含搜索结果的文档列表。 |
源代码位于 llama-index-integrations/tools/llama-index-tools-brave-search/llama_index/tools/brave_search/base.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|