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 |
|
context #
context(query: str, search_type: str = 'both', data_sources: Optional[List[str]] = None, max_num_results: int = 10, max_price: Optional[float] = None, query_rewrite: bool = True, similarity_threshold: float = 0.5) -> List[Document]
Find relevant programmaticly licensed proprietary content and the web to answer your query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
str
|
The question or topic to search for |
required |
search_type
|
str
|
Type of sources to search - "proprietary", "web", or "both" |
'both'
|
data_sources
|
Optional[List[str]]
|
Specific indexes to query from |
None
|
max_num_results
|
int
|
Maximum number of results to return. Defaults to 10 |
10
|
max_price
|
Optional[float]
|
Maximum price per content in PCM. Defaults to 100 |
None
|
query_rewrite
|
bool
|
Whether to rewrite the query to improve results. Defaults to True |
True
|
similarity_threshold
|
float
|
Minimum similarity score for results. Defaults to 0.5 |
0.5
|
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 |
|