repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-google/llama_index/tools/google/search/__init__.py | llama-index-integrations/tools/llama-index-tools-google/llama_index/tools/google/search/__init__.py | # init
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-google/llama_index/tools/google/search/base.py | llama-index-integrations/tools/llama-index-tools-google/llama_index/tools/google/search/base.py | """Google Search tool spec."""
import json
import httpx
import urllib.parse
from typing import Dict, List, Optional, Union
from llama_index.core.tools.tool_spec.base import BaseToolSpec
QUERY_URL_TMPL = (
"https://www.googleapis.com/customsearch/v1?key={key}&cx={engine}&q={query}"
)
class GoogleSearchToolSpec(... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-exa/tests/test_tools_exa.py | llama-index-integrations/tools/llama-index-tools-exa/tests/test_tools_exa.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.exa import ExaToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in ExaToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-exa/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-exa/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-exa/llama_index/tools/exa/__init__.py | llama-index-integrations/tools/llama-index-tools-exa/llama_index/tools/exa/__init__.py | from llama_index.tools.exa.base import ExaToolSpec
__all__ = ["ExaToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-exa/llama_index/tools/exa/base.py | llama-index-integrations/tools/llama-index-tools-exa/llama_index/tools/exa/base.py | """Exa tool spec."""
import datetime
from typing import List, Optional
from llama_index.core.schema import Document
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class ExaToolSpec(BaseToolSpec):
"""Exa tool spec."""
spec_functions = [
"search",
"retrieve_documents",
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-serpex/test_local.py | llama-index-integrations/tools/llama-index-tools-serpex/test_local.py | #!/usr/bin/env python3
"""Local test script for SERPEX tool integration."""
import os
from llama_index.tools.serpex import SerpexToolSpec
# Test 1: Check initialization
print("Test 1: Initializing SERPEX tool...")
try:
# You need to set your SERPEX_API_KEY environment variable
api_key = os.environ.get("SERPE... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-serpex/tests/test_serpex.py | llama-index-integrations/tools/llama-index-tools-serpex/tests/test_serpex.py | """Tests for SERPEX tool."""
import os
from unittest.mock import MagicMock, patch
import pytest
import requests
from llama_index.tools.serpex import SerpexToolSpec
def test_serpex_init_with_key():
"""Test initialization with API key."""
tool = SerpexToolSpec(api_key="test-key")
assert tool.api_key == "... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-serpex/examples/serpex_example.py | llama-index-integrations/tools/llama-index-tools-serpex/examples/serpex_example.py | """Example usage of SERPEX tool with LlamaIndex."""
import os
from llama_index.tools.serpex import SerpexToolSpec
# Set your API key (or use environment variable SERPEX_API_KEY)
os.environ["SERPEX_API_KEY"] = "your_api_key_here"
def basic_search_example():
"""Basic search example."""
print("=" * 60)
pr... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-serpex/llama_index/tools/serpex/__init__.py | llama-index-integrations/tools/llama-index-tools-serpex/llama_index/tools/serpex/__init__.py | """SERPEX tool for LlamaIndex."""
from llama_index.tools.serpex.base import SerpexToolSpec
__all__ = ["SerpexToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-serpex/llama_index/tools/serpex/base.py | llama-index-integrations/tools/llama-index-tools-serpex/llama_index/tools/serpex/base.py | """SERPEX search tool specification."""
import os
from typing import Any, Dict, List, Optional
import requests
from llama_index.core.schema import Document
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class SerpexToolSpec(BaseToolSpec):
"""
SERPEX tool spec for web search.
This tool ... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-openai/tests/test_tools_openai_image_generation.py | llama-index-integrations/tools/llama-index-tools-openai/tests/test_tools_openai_image_generation.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.openai import OpenAIImageGenerationToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in OpenAIImageGenerationToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-openai/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-openai/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-openai/llama_index/tools/openai/__init__.py | llama-index-integrations/tools/llama-index-tools-openai/llama_index/tools/openai/__init__.py | ## init file
from llama_index.tools.openai.image_generation.base import (
OpenAIImageGenerationToolSpec,
)
__all__ = ["OpenAIImageGenerationToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-openai/llama_index/tools/openai/image_generation/__init__.py | llama-index-integrations/tools/llama-index-tools-openai/llama_index/tools/openai/image_generation/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-openai/llama_index/tools/openai/image_generation/base.py | llama-index-integrations/tools/llama-index-tools-openai/llama_index/tools/openai/image_generation/base.py | """OpenAI Image Generation tool spec."""
import base64
import os
import time
from typing import Optional
from llama_index.core.tools.tool_spec.base import BaseToolSpec
DEFAULT_CACHE_DIR = "../../../img_cache"
DEFAULT_SIZE = "1024x1024"
valid_sizes = {
"dall-e-2": ["256x256", "512x512", "1024x1024"],
"dall-e... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-shopify/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-shopify/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-shopify/tests/test_tools_shopify.py | llama-index-integrations/tools/llama-index-tools-shopify/tests/test_tools_shopify.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.shopify import ShopifyToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in ShopifyToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-shopify/llama_index/tools/shopify/__init__.py | llama-index-integrations/tools/llama-index-tools-shopify/llama_index/tools/shopify/__init__.py | from llama_index.tools.shopify.base import ShopifyToolSpec
__all__ = ["ShopifyToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-shopify/llama_index/tools/shopify/base.py | llama-index-integrations/tools/llama-index-tools-shopify/llama_index/tools/shopify/base.py | """Shopify tool spec."""
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class ShopifyToolSpec(BaseToolSpec):
"""Shopify tool spec."""
spec_functions = ["run_graphql_query"]
def __init__(self, shop_url: str, api_version: str, admin_api_key: str):
# Currently only supports Admin A... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-playwright/tests/test_tools_playwright.py | llama-index-integrations/tools/llama-index-tools-playwright/tests/test_tools_playwright.py | import asyncio
import json
import os
import pytest
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.playwright import PlaywrightToolSpec
# install playwright
os.system("playwright install")
TEST_HYPERLINKS = {
"/python/community/ambassadors",
"/python/docs/emulation",
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-playwright/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-playwright/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-playwright/llama_index/tools/playwright/__init__.py | llama-index-integrations/tools/llama-index-tools-playwright/llama_index/tools/playwright/__init__.py | from llama_index.tools.playwright.base import PlaywrightToolSpec
__all__ = ["PlaywrightToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-playwright/llama_index/tools/playwright/base.py | llama-index-integrations/tools/llama-index-tools-playwright/llama_index/tools/playwright/base.py | from typing import Optional, Any, List, Sequence
import json
from urllib.parse import urlparse, urljoin
from bs4 import BeautifulSoup
from playwright.async_api import Browser as AsyncBrowser
from playwright.async_api import Page as AsyncPage
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class Playw... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-yahoo-finance/tests/test_tools_yahoo_finance.py | llama-index-integrations/tools/llama-index-tools-yahoo-finance/tests/test_tools_yahoo_finance.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.yahoo_finance import YahooFinanceToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in YahooFinanceToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-yahoo-finance/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-yahoo-finance/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-yahoo-finance/llama_index/tools/yahoo_finance/__init__.py | llama-index-integrations/tools/llama-index-tools-yahoo-finance/llama_index/tools/yahoo_finance/__init__.py | ## init
from llama_index.tools.yahoo_finance.base import (
YahooFinanceToolSpec,
)
__all__ = ["YahooFinanceToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-yahoo-finance/llama_index/tools/yahoo_finance/base.py | llama-index-integrations/tools/llama-index-tools-yahoo-finance/llama_index/tools/yahoo_finance/base.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
import yfinance as yf
import pandas as pd
class YahooFinanceToolSpec(BaseToolSpec):
"""Yahoo Finance tool spec."""
spec_functions = [
"balance_sheet",
"income_statement",
"cash_flow",
"stock_basic_info",
"s... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-waii/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-waii/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-waii/tests/test_tools_waii.py | llama-index-integrations/tools/llama-index-tools-waii/tests/test_tools_waii.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.waii import WaiiToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in WaiiToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-waii/llama_index/tools/waii/__init__.py | llama-index-integrations/tools/llama-index-tools-waii/llama_index/tools/waii/__init__.py | from llama_index.tools.waii.base import WaiiToolSpec
__all__ = ["WaiiToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-waii/llama_index/tools/waii/base.py | llama-index-integrations/tools/llama-index-tools-waii/llama_index/tools/waii/base.py | """Waii Tool."""
import json
from typing import Any, List, Optional
from llama_index.core.readers.base import BaseReader
from llama_index.core.response_synthesizers import TreeSummarize
from llama_index.core.schema import Document
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class WaiiToolSpec(Bas... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-neo4j/llama_index/tools/neo4j/query_validator.py | llama-index-integrations/tools/llama-index-tools-neo4j/llama_index/tools/neo4j/query_validator.py | import re
from collections import namedtuple
from typing import Any, Dict, List, Optional, Tuple
Schema = namedtuple("Schema", ["left_node", "relation", "right_node"]) # noqa: PYI024
class CypherQueryCorrector:
"""
Used to correct relationship direction in generated Cypher statements.
This code is copie... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-neo4j/llama_index/tools/neo4j/__init__.py | llama-index-integrations/tools/llama-index-tools-neo4j/llama_index/tools/neo4j/__init__.py | from llama_index.tools.neo4j.base import Neo4jQueryToolSpec
__all__ = ["Neo4jQueryToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-neo4j/llama_index/tools/neo4j/base.py | llama-index-integrations/tools/llama-index-tools-neo4j/llama_index/tools/neo4j/base.py | from importlib.util import find_spec
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.graph_stores.neo4j import Neo4jGraphStore
from llama_index.tools.neo4j.query_validator import CypherQueryCorrector, Schema
# backwards compatibility
try:
from llama_index.core.base.llms.types impor... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-valyu/tests/test_tools_valyu.py | llama-index-integrations/tools/llama-index-tools-valyu/tests/test_tools_valyu.py | from unittest.mock import Mock, patch
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.valyu import ValyuToolSpec, ValyuRetriever
from llama_index.core.schema import Document, NodeWithScore, TextNode
def test_class():
names_of_base_classes = [b.__name__ for b in ValyuToolSpec.... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-valyu/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-valyu/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-valyu/examples/context.py | llama-index-integrations/tools/llama-index-tools-valyu/examples/context.py | # Get OS for environment variables
import os
# Set up OpenAI
from llama_index.agent.openai import OpenAIAgent
from llama_index.tools.valyu import ValyuToolSpec
valyu_tool = ValyuToolSpec(
api_key=os.environ["VALYU_API_KEY"],
max_price=100, # default is 100
fast_mode=True, # Enable fast mode for faster ... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-valyu/examples/retriever_example.py | llama-index-integrations/tools/llama-index-tools-valyu/examples/retriever_example.py | """
Example demonstrating the ValyuRetriever for URL content extraction.
This example shows how to use the ValyuRetriever to extract content from URLs
and integrate it with LlamaIndex retrieval pipelines.
"""
import os
from llama_index.tools.valyu import ValyuRetriever
from llama_index.core import QueryBundle
def m... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-valyu/llama_index/tools/valyu/__init__.py | llama-index-integrations/tools/llama-index-tools-valyu/llama_index/tools/valyu/__init__.py | from llama_index.tools.valyu.base import ValyuToolSpec
from llama_index.tools.valyu.retriever import ValyuRetriever
__all__ = ["ValyuToolSpec", "ValyuRetriever"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-valyu/llama_index/tools/valyu/retriever.py | llama-index-integrations/tools/llama-index-tools-valyu/llama_index/tools/valyu/retriever.py | """Valyu retriever implementation."""
from typing import List, Optional, Union, Dict, Any
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.schema import NodeWithScore, TextNode
from llama_index.core.callbacks import CallbackManager
class ValyuRetriever(BaseRetriever):
"""Valy... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-valyu/llama_index/tools/valyu/base.py | llama-index-integrations/tools/llama-index-tools-valyu/llama_index/tools/valyu/base.py | """Valyu tool spec."""
from typing import List, Optional, Union, Dict, Any
from llama_index.core.schema import Document
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class ValyuToolSpec(BaseToolSpec):
"""Valyu tool spec."""
spec_functions = [
"search",
"get_contents",
]... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/tests/test_rest_api_spec.py | llama-index-integrations/tools/llama-index-tools-agentql/tests/test_rest_api_spec.py | import os
import pytest
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.llms.openai import OpenAI
from llama_index.tools.agentql import AgentQLRestAPIToolSpec
from tests.conftest import get_testing_data
def test_class():
n... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/tests/test_browser_spec.py | llama-index-integrations/tools/llama-index-tools-agentql/tests/test_browser_spec.py | import os
import pytest
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.llms.openai import OpenAI
from llama_index.tools.agentql import AgentQLBrowserToolSpec
from llama_index.tools.playwright import PlaywrightToolSpec
from test... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/tests/conftest.py | llama-index-integrations/tools/llama-index-tools-agentql/tests/conftest.py | def get_testing_data() -> dict:
return {
"TEST_DATA": {
"product": {
"name": "iKey FT-88-TP-USB Police Emergency Car Mount Backlit Red USB Keyboard B22",
"price": 27.95,
"condition": "Used",
},
"seller": {"name": "Ativo"},
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-agentql/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/const.py | llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/const.py | DEFAULT_EXTRACT_ELEMENTS_TIMEOUT_SECONDS = 300
DEFAULT_EXTRACT_DATA_TIMEOUT_SECONDS = 900
DEFAULT_WAIT_FOR_NETWORK_IDLE = True
DEFAULT_INCLUDE_HIDDEN_DATA = True
DEFAULT_INCLUDE_HIDDEN_ELEMENTS = False
DEFAULT_RESPONSE_MODE = "fast"
DEFAULT_WAIT_FOR_PAGE_LOAD_SECONDS = 0
DEFAULT_IS_SCROLL_TO_BOTTOM_ENABLED = False
DEF... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/utils.py | llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/utils.py | from typing import Optional
import agentql
import httpx
from llama_index.tools.agentql.const import EXTRACT_DATA_ENDPOINT, REQUEST_ORIGIN
from llama_index.tools.agentql.messages import (
QUERY_PROMPT_REQUIRED_ERROR_MESSAGE,
QUERY_PROMPT_EXCLUSIVE_ERROR_MESSAGE,
UNAUTHORIZED_ERROR_MESSAGE,
)
try:
from ... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/__init__.py | llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/__init__.py | from llama_index.tools.agentql.agentql_browser_tool.base import (
AgentQLBrowserToolSpec,
)
from llama_index.tools.agentql.agentql_rest_api_tool.base import (
AgentQLRestAPIToolSpec,
)
__all__ = [
"AgentQLBrowserToolSpec",
"AgentQLRestAPIToolSpec",
]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/messages.py | llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/messages.py | QUERY_PROMPT_REQUIRED_ERROR_MESSAGE = (
"Invalid arguments provided. Either 'query' or 'prompt' must be provided."
)
QUERY_PROMPT_EXCLUSIVE_ERROR_MESSAGE = (
"Invalid arguments provided. Only one of 'query' or 'prompt' should be provided."
)
UNSET_API_KEY_ERROR_MESSAGE = "No AgentQL API key provided. You can se... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/agentql_rest_api_tool/__init__.py | llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/agentql_rest_api_tool/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/agentql_rest_api_tool/base.py | llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/agentql_rest_api_tool/base.py | from typing import Optional
import os
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.agentql.const import (
DEFAULT_API_TIMEOUT_SECONDS,
DEFAULT_IS_STEALTH_MODE_ENABLED,
DEFAULT_WAIT_FOR_PAGE_LOAD_SECONDS,
DEFAULT_IS_SCROLL_TO_BOTTOM_ENABLED,
DEFAULT_RESPONSE... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/agentql_browser_tool/__init__.py | llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/agentql_browser_tool/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/agentql_browser_tool/base.py | llama-index-integrations/tools/llama-index-tools-agentql/llama_index/tools/agentql/agentql_browser_tool/base.py | from typing import Optional
from playwright.async_api import Browser as AsyncBrowser
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.agentql.const import (
DEFAULT_EXTRACT_DATA_TIMEOUT_SECONDS,
DEFAULT_EXTRACT_ELEMENTS_TIMEOUT_SECONDS,
DEFAULT_WAIT_FOR_NETWORK_IDLE,
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/tests/test_tools_scrapegraph.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/tests/test_tools_scrapegraph.py | """Unit tests for ScrapeGraphAI tool specification."""
from unittest.mock import Mock, patch
import pytest
from pydantic import BaseModel, Field
from llama_index.tools.scrapegraph import ScrapegraphToolSpec
class TestSchema(BaseModel):
"""Test schema for scraping operations."""
title: str = Field(descript... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/tests/test_integration.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/tests/test_integration.py | """
Integration tests for ScrapeGraph tool specification.
These tests verify that the tool integrates properly with LlamaIndex
and can be used in real-world scenarios.
"""
import os
from unittest.mock import Mock, patch
from typing import List
import pytest
from pydantic import BaseModel, Field
from llama_index.too... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-markdowinify-llama-index.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-markdowinify-llama-index.py | """
Example demonstrating ScrapeGraph Markdownify integration with LlamaIndex.
This example shows how to use the ScrapegraphToolSpec to convert web pages
to clean, structured markdown format.
"""
from llama_index.tools.scrapegraph import ScrapegraphToolSpec
def main():
"""Demonstrate Markdownify functionality f... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/complete-scrapegraph-examples.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/complete-scrapegraph-examples.py | """
Comprehensive example showcasing all ScrapeGraph tool functionalities with LlamaIndex.
This example demonstrates all available methods in the ScrapegraphToolSpec:
- SmartScraper for intelligent data extraction
- Markdownify for content conversion
- Search for web search functionality
- Basic Scrape for HTML extrac... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-search-llama-index.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-search-llama-index.py | """
Example demonstrating ScrapeGraph Search integration with LlamaIndex.
This example shows how to use the ScrapegraphToolSpec for search functionality
both standalone and integrated with LlamaIndex agents.
"""
import os
from llama_index.tools.scrapegraph import ScrapegraphToolSpec
def standalone_search_examples()... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-agentic-scraper-llama-index.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-agentic-scraper-llama-index.py | """
Example demonstrating ScrapeGraph Agentic Scraper integration with LlamaIndex.
This example shows how to use the ScrapegraphToolSpec for agentic scraping
that can navigate and interact with websites intelligently.
"""
from typing import List
from pydantic import BaseModel, Field
from llama_index.tools.scrapegrap... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-smartscraper-lama-index.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-smartscraper-lama-index.py | """
Example demonstrating ScrapeGraph SmartScraper integration with LlamaIndex.
This example shows how to use the ScrapegraphToolSpec to extract structured data
from web pages using AI-powered scraping with defined schemas.
"""
import os
from typing import List
from pydantic import BaseModel, Field
from llama_index.... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-scrape-llama-index.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-scrape-llama-index.py | """
Example demonstrating ScrapeGraph basic scraping integration with LlamaIndex.
This example shows how to use the ScrapegraphToolSpec for basic HTML scraping
with various options like JavaScript rendering and custom headers.
"""
from llama_index.tools.scrapegraph import ScrapegraphToolSpec
def main():
"""Demo... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/llama_index/tools/scrapegraph/__init__.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/llama_index/tools/scrapegraph/__init__.py | from llama_index.tools.scrapegraph.base import ScrapegraphToolSpec
__all__ = ["ScrapegraphToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-scrapegraph/llama_index/tools/scrapegraph/base.py | llama-index-integrations/tools/llama-index-tools-scrapegraph/llama_index/tools/scrapegraph/base.py | """ScrapeGraph tool specification module for web scraping operations."""
from typing import Any, Dict, List, Optional, Union
from pydantic import BaseModel
from scrapegraph_py import Client
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class ScrapegraphToolSpec(BaseToolSpec):
"""
ScrapeGra... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-finance/tests/test_finance_tools.py | llama-index-integrations/tools/llama-index-tools-finance/tests/test_finance_tools.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.finance import FinanceAgentToolSpec
def test_class():
name_of_base_classes = [b.__name__ for b in FinanceAgentToolSpec.__mro__]
assert BaseToolSpec.__name__ in name_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-finance/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-finance/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/earnings.py | llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/earnings.py | import csv
import requests
import pandas as pd
import yfinance as yf
from typing import Dict
def get_earnings_history(api_key: Dict[str, str], symbol: str) -> pd.DataFrame:
"""
Get actual, estimated earnings and surprise history for a given stock ticker symbol.
If somehow api response is not found, retu... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/util.py | llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/util.py | import requests
import pandas as pd
import re
from typing import Optional
def request(url: str, method: str = "get", timeout: int = 10, **kwargs):
"""Helper to make requests from a url."""
method = method.lower()
assert method in [
"delete",
"get",
"head",
"patch",
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/comparisons.py | llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/comparisons.py | """Find similar companies across different indexes based on available open source models."""
from typing import Dict
from llama_index.tools.finance.util import request
def find_similar_companies(api_key: Dict[str, str], symbol: str, country=None):
"""
Returns a list of companies similar to provided stock sy... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/__init__.py | llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/__init__.py | ## init
from llama_index.tools.finance.base import (
FinanceAgentToolSpec,
)
__all__ = ["FinanceAgentToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/news.py | llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/news.py | import pandas as pd
from collections import defaultdict
from datetime import datetime, timedelta
from bs4 import BeautifulSoup
from pytrends.request import TrendReq
from typing import List, Dict, Optional, Any
from newsapi import NewsApiClient
from llama_index.tools.finance.util import get_df, request
def get_curre... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py | llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py | from typing import List, Optional, Any, Dict
import pandas as pd
from datetime import datetime, timedelta
from llama_index.tools.finance import comparisons, earnings, news
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class FinanceAgentToolSpec(BaseToolSpec):
spec_functions = [
"find_sim... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-code-interpreter/tests/test_tools_code_interpreter.py | llama-index-integrations/tools/llama-index-tools-code-interpreter/tests/test_tools_code_interpreter.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.code_interpreter import CodeInterpreterToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in CodeInterpreterToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-code-interpreter/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-code-interpreter/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-code-interpreter/llama_index/tools/code_interpreter/__init__.py | llama-index-integrations/tools/llama-index-tools-code-interpreter/llama_index/tools/code_interpreter/__init__.py | """init.py."""
from llama_index.tools.code_interpreter.base import (
CodeInterpreterToolSpec,
)
__all__ = ["CodeInterpreterToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-code-interpreter/llama_index/tools/code_interpreter/base.py | llama-index-integrations/tools/llama-index-tools-code-interpreter/llama_index/tools/code_interpreter/base.py | """Code Interpreter tool spec."""
import subprocess
import sys
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class CodeInterpreterToolSpec(BaseToolSpec):
"""
Code Interpreter tool spec.
WARNING: This tool provides the Agent access to the `subprocess.run` command.
Arbitrary code exe... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-graphql/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-graphql/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-graphql/tests/test_tools_graphql.py | llama-index-integrations/tools/llama-index-tools-graphql/tests/test_tools_graphql.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.graphql import GraphQLToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in GraphQLToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-graphql/llama_index/tools/graphql/__init__.py | llama-index-integrations/tools/llama-index-tools-graphql/llama_index/tools/graphql/__init__.py | ## init
from llama_index.tools.graphql.base import (
GraphQLToolSpec,
)
__all__ = ["GraphQLToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-graphql/llama_index/tools/graphql/base.py | llama-index-integrations/tools/llama-index-tools-graphql/llama_index/tools/graphql/base.py | """GraphQL Tool."""
from typing import Optional
import requests
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class GraphQLToolSpec(BaseToolSpec):
"""Requests Tool."""
spec_functions = ["graphql_request"]
def __init__(self, url: str, headers: Optional[dict] = {}):
self.headers... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-text-to-image/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-text-to-image/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-text-to-image/tests/test_tools_text_to_image.py | llama-index-integrations/tools/llama-index-tools-text-to-image/tests/test_tools_text_to_image.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.text_to_image import TextToImageToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in TextToImageToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-text-to-image/llama_index/tools/text_to_image/__init__.py | llama-index-integrations/tools/llama-index-tools-text-to-image/llama_index/tools/text_to_image/__init__.py | from llama_index.tools.text_to_image.base import TextToImageToolSpec
__all__ = ["TextToImageToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-text-to-image/llama_index/tools/text_to_image/base.py | llama-index-integrations/tools/llama-index-tools-text-to-image/llama_index/tools/text_to_image/base.py | """Text to Image tool spec."""
from io import BytesIO
from typing import List, Optional
import openai
import requests
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class TextToImageToolSpec(BaseToolSpec):
"""Text to Image tool spec."""
spec_functions = ["generate_images", "show_images", "g... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-tavily-research/tests/test_tools_tavily_research.py | llama-index-integrations/tools/llama-index-tools-tavily-research/tests/test_tools_tavily_research.py | from unittest.mock import Mock, patch
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.core.schema import Document
from llama_index.tools.tavily_research import TavilyToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in TavilyToolSpec.__mro__]
assert BaseToolS... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-tavily-research/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-tavily-research/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-tavily-research/llama_index/tools/tavily_research/__init__.py | llama-index-integrations/tools/llama-index-tools-tavily-research/llama_index/tools/tavily_research/__init__.py | from llama_index.tools.tavily_research.base import TavilyToolSpec
__all__ = ["TavilyToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-tavily-research/llama_index/tools/tavily_research/base.py | llama-index-integrations/tools/llama-index-tools-tavily-research/llama_index/tools/tavily_research/base.py | """Tavily tool spec."""
from typing import List, Optional
from llama_index.core.schema import Document
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class TavilyToolSpec(BaseToolSpec):
"""Tavily tool spec."""
spec_functions = [
"search",
"extract",
]
def __init__(s... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-arxiv/tests/test_tools_arxiv.py | llama-index-integrations/tools/llama-index-tools-arxiv/tests/test_tools_arxiv.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.arxiv import ArxivToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in ArxivToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-arxiv/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-arxiv/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-arxiv/llama_index/tools/arxiv/__init__.py | llama-index-integrations/tools/llama-index-tools-arxiv/llama_index/tools/arxiv/__init__.py | from llama_index.tools.arxiv.base import ArxivToolSpec
__all__ = ["ArxivToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-arxiv/llama_index/tools/arxiv/base.py | llama-index-integrations/tools/llama-index-tools-arxiv/llama_index/tools/arxiv/base.py | """arXiv tool spec."""
from typing import Optional
from llama_index.core.schema import Document
from llama_index.core.tools.tool_spec.base import BaseToolSpec
class ArxivToolSpec(BaseToolSpec):
"""arXiv tool spec."""
spec_functions = ["arxiv_query"]
def __init__(self, max_results: Optional[int] = 3):
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-slack/tests/test_tools_slack.py | llama-index-integrations/tools/llama-index-tools-slack/tests/test_tools_slack.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.slack import SlackToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in SlackToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-slack/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-slack/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-slack/llama_index/tools/slack/__init__.py | llama-index-integrations/tools/llama-index-tools-slack/llama_index/tools/slack/__init__.py | # __init__.py
from llama_index.tools.slack.base import (
SlackToolSpec,
)
__all__ = ["SlackToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-slack/llama_index/tools/slack/base.py | llama-index-integrations/tools/llama-index-tools-slack/llama_index/tools/slack/base.py | """Slack tool spec."""
import logging
from datetime import datetime
from ssl import SSLContext
from typing import List, Optional
from llama_index.core.schema import Document
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.readers.slack import SlackReader
logger = logging.getLogger(__n... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-zapier/tests/test_tools_zapier.py | llama-index-integrations/tools/llama-index-tools-zapier/tests/test_tools_zapier.py | from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.zapier import ZapierToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in ZapierToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-zapier/tests/__init__.py | llama-index-integrations/tools/llama-index-tools-zapier/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/tools/llama-index-tools-zapier/llama_index/tools/zapier/__init__.py | llama-index-integrations/tools/llama-index-tools-zapier/llama_index/tools/zapier/__init__.py | """Init file."""
from llama_index.tools.zapier.base import (
ACTION_URL_TMPL,
ZapierToolSpec,
)
__all__ = ["ACTION_URL_TMPL", "ZapierToolSpec"]
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.