Valyu
ValyuToolSpec #
Bases: BaseToolSpec
Valyu tool spec.
Source code in llama-index-integrations/tools/llama-index-tools-valyu/llama_index/tools/valyu/base.py
9 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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
search #
search(query: str, search_type: str = 'all', max_num_results: int = 5, relevance_threshold: float = 0.5, max_price: Optional[float] = None, start_date: Optional[str] = None, end_date: Optional[str] = None) -> List[Document]
Search and retrieve relevant content from proprietary and public sources using Valyu's deep search.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
str
|
The input query to be processed |
required |
search_type
|
str
|
Type of search - "all" (both proprietary and web), "proprietary" (Valyu indices only), or "web" (web search only). Defaults to "all" |
'all'
|
max_num_results
|
int
|
Maximum number of results to return (1-20). Defaults to 5 |
5
|
relevance_threshold
|
float
|
Minimum relevance score required for results (0.0-1.0). Defaults to 0.5 |
0.5
|
max_price
|
Optional[float]
|
Maximum cost in dollars for this search. Defaults to 20.0 |
None
|
start_date
|
Optional[str]
|
Start date for time filtering in YYYY-MM-DD format |
None
|
end_date
|
Optional[str]
|
End date for time filtering in YYYY-MM-DD format |
None
|
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: List of Document objects containing the search results |
Source code in llama-index-integrations/tools/llama-index-tools-valyu/llama_index/tools/valyu/base.py
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|