llama-index tools valyu integration
Project description
LlamaIndex Tools Integration: Valyu
This tool connects to Valyu and its Exchange Platform to easily enable your agent to search and get content from programmatically licensed proprietary content and the web using Valyu's deep search API.
To begin, you need to obtain an API key on the Valyu developer dashboard. You can also use the SDK without an API key by setting the VALYU_API_KEY environment variable.
Usage
Here's an example usage of the ValyuToolSpec.
# %pip install llama-index llama-index-core llama-index-tools-valyu
from llama_index.tools.valyu import ValyuToolSpec
from llama_index.agent.openai import OpenAIAgent
import os
valyu_tool = ValyuToolSpec(
api_key=os.environ["VALYU_API_KEY"],
max_price=100, # default is 100
)
agent = OpenAIAgent.from_tools(valyu_tool.to_tool_list())
agent.chat(
"What are the implications of using different volatility calculation methods (EWMA vs. GARCH) in Value at Risk (VaR) modeling for fixed income portfolios?"
)
# You can also search directly with the new parameters
results = valyu_tool.search(
query="artificial intelligence trends 2024",
included_sources=[
"arxiv.org",
"nature.com",
], # Only search academic sources
response_length="medium", # 50k characters per result
max_num_results=3,
relevance_threshold=0.5,
)
search: Search and retrieve relevant content from proprietary and public sources using Valyu's deep search. Supports filtering by:
- Search type ("all", "proprietary", or "web")
- Relevance threshold
- Date ranges (start_date, end_date)
- Source filtering (included_sources, excluded_sources)
- Response length (integer for character count or preset values: "short" 25k, "medium" 50k, "large" 100k, "max" full content)
This loader is designed to be used as a way to load data as a Tool in a Agent.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_tools_valyu-0.3.0.tar.gz.
File metadata
- Download URL: llama_index_tools_valyu-0.3.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3637d0182f59a9ab01953a0cafa39fea4c6c773c06cf02a3a91aeba0dee083b
|
|
| MD5 |
947fa4b6986adaabd5aa5b4054ad8aab
|
|
| BLAKE2b-256 |
469352dd80a9e057a6f2b64616aa6e8fc71929a2eec401921b8599e61658e4da
|
File details
Details for the file llama_index_tools_valyu-0.3.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_tools_valyu-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e58706077421075c446a0f95f0a82dd669876fb9557aa4262f36d867deb38dbb
|
|
| MD5 |
7d62f6c5c802869a70a095dfeb97609e
|
|
| BLAKE2b-256 |
70ffef5c4ec283df41019b6dd6ce375564a0777af1582d312093d2203bea6dc4
|