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-packs/llama-index-packs-ragatouille-retriever/llama_index/packs/ragatouille_retriever/base.py | llama-index-packs/llama-index-packs-ragatouille-retriever/llama_index/packs/ragatouille_retriever/base.py | """RAGatouille Retriever Pack."""
from typing import Any, Dict, List, Optional
from llama_index.core import Settings
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.indices.query.schema import QueryBundle
from llama_index.core.llama_pack.base import BaseLlamaPack
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-packs/llama-index-packs-voyage-query-engine/tests/test_packs_voyage_query_engine.py | llama-index-packs/llama-index-packs-voyage-query-engine/tests/test_packs_voyage_query_engine.py | from llama_index.core.llama_pack import BaseLlamaPack
from llama_index.packs.voyage_query_engine import VoyageQueryEnginePack
def test_class():
names_of_base_classes = [b.__name__ for b in VoyageQueryEnginePack.__mro__]
assert BaseLlamaPack.__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-packs/llama-index-packs-voyage-query-engine/tests/__init__.py | llama-index-packs/llama-index-packs-voyage-query-engine/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-packs/llama-index-packs-voyage-query-engine/examples/example.py | llama-index-packs/llama-index-packs-voyage-query-engine/examples/example.py | # Required Environment Variables: OPENAI_API_KEY, VOYAGE_API_KEY
from pathlib import Path
from llama_index.readers.file.docs import PDFReader
from llama_index.packs.voyage_query_engine import VoyageQueryEnginePack
# load documents
loader = PDFReader()
document_path = Path("./data/101.pdf") # replace with your own do... | 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-packs/llama-index-packs-voyage-query-engine/llama_index/packs/voyage_query_engine/__init__.py | llama-index-packs/llama-index-packs-voyage-query-engine/llama_index/packs/voyage_query_engine/__init__.py | from llama_index.packs.voyage_query_engine.base import VoyageQueryEnginePack
__all__ = ["VoyageQueryEnginePack"]
| 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-packs/llama-index-packs-voyage-query-engine/llama_index/packs/voyage_query_engine/base.py | llama-index-packs/llama-index-packs-voyage-query-engine/llama_index/packs/voyage_query_engine/base.py | import os
from typing import Any, Dict, List
from llama_index.core import Settings, VectorStoreIndex
from llama_index.core.llama_pack.base import BaseLlamaPack
from llama_index.core.schema import Document
from llama_index.embeddings.voyageai import VoyageEmbedding
from llama_index.llms.openai import OpenAI
class Voy... | 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-packs/llama-index-packs-resume-screener/llama_index/packs/resume_screener/__init__.py | llama-index-packs/llama-index-packs-resume-screener/llama_index/packs/resume_screener/__init__.py | from llama_index.packs.resume_screener.base import ResumeScreenerPack
__all__ = ["ResumeScreenerPack"]
| 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-packs/llama-index-packs-resume-screener/llama_index/packs/resume_screener/base.py | llama-index-packs/llama-index-packs-resume-screener/llama_index/packs/resume_screener/base.py | from pathlib import Path
from typing import Any, Dict, List, Optional
from llama_index.core import Settings
from llama_index.core.llama_pack.base import BaseLlamaPack
from llama_index.core.response_synthesizers import TreeSummarize
from llama_index.core.schema import NodeWithScore
from llama_index.llms.openai import O... | 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-packs/llama-index-packs-longrag/tests/__init__.py | llama-index-packs/llama-index-packs-longrag/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-packs/llama-index-packs-longrag/tests/test_packs_longrag.py | llama-index-packs/llama-index-packs-longrag/tests/test_packs_longrag.py | from llama_index.core.llama_pack import BaseLlamaPack
from llama_index.packs.longrag import LongRAGPack
def test_class():
names_of_base_classes = [b.__name__ for b in LongRAGPack.__mro__]
assert BaseLlamaPack.__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-packs/llama-index-packs-longrag/llama_index/packs/longrag/__init__.py | llama-index-packs/llama-index-packs-longrag/llama_index/packs/longrag/__init__.py | from llama_index.packs.longrag.base import LongRAGPack
__all__ = ["LongRAGPack"]
| 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-packs/llama-index-packs-longrag/llama_index/packs/longrag/base.py | llama-index-packs/llama-index-packs-longrag/llama_index/packs/longrag/base.py | import typing as t
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex
from llama_index.core.async_utils import asyncio_run
from llama_index.core.node_parser import SentenceSplitter
from llama_index.core.retrievers import BaseRetriever
from llama_index.core.workflow import (
Event,
Workflow,
... | 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-packs/llama-index-packs-ollama-query-engine/tests/__init__.py | llama-index-packs/llama-index-packs-ollama-query-engine/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-packs/llama-index-packs-ollama-query-engine/tests/test_packs_ollama_query_engine.py | llama-index-packs/llama-index-packs-ollama-query-engine/tests/test_packs_ollama_query_engine.py | from llama_index.core.llama_pack import BaseLlamaPack
from llama_index.packs.ollama_query_engine import OllamaQueryEnginePack
def test_class():
names_of_base_classes = [b.__name__ for b in OllamaQueryEnginePack.__mro__]
assert BaseLlamaPack.__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-packs/llama-index-packs-ollama-query-engine/llama_index/packs/ollama_query_engine/__init__.py | llama-index-packs/llama-index-packs-ollama-query-engine/llama_index/packs/ollama_query_engine/__init__.py | from llama_index.packs.ollama_query_engine.base import OllamaQueryEnginePack
__all__ = ["OllamaQueryEnginePack"]
| 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-packs/llama-index-packs-ollama-query-engine/llama_index/packs/ollama_query_engine/base.py | llama-index-packs/llama-index-packs-ollama-query-engine/llama_index/packs/ollama_query_engine/base.py | """LlamaPack class."""
from typing import Any, Dict, List
from llama_index.core import Settings, VectorStoreIndex
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.bridge.pydantic import PrivateAttr
from llama_index.core.llama_pack.base import BaseLlamaPack
from llama_index.core.sc... | 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-cli/tests/test_cli.py | llama-index-cli/tests/test_cli.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-cli/tests/__init__.py | llama-index-cli/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-cli/tests/test_rag.py | llama-index-cli/tests/test_rag.py | import glob
import subprocess
from pathlib import Path
from unittest import mock
import tempfile
from llama_index.cli import command_line
from llama_index.cli.rag import RagCLI
from llama_index.core.ingestion import IngestionPipeline
@mock.patch.object(RagCLI, "handle_cli", return_value="noop")
@mock.patch(
"sys... | 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-cli/llama_index/cli/command_line.py | llama-index-cli/llama_index/cli/command_line.py | import argparse
from typing import Any, Optional
from llama_index.cli.rag import RagCLI, default_ragcli_persist_dir
from llama_index.cli.upgrade import upgrade_dir, upgrade_file
from llama_index.core.ingestion import IngestionCache, IngestionPipeline
from llama_index.core.download.module import LLAMA_HUB_URL
from llam... | 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-cli/llama_index/cli/__init__.py | llama-index-cli/llama_index/cli/__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-cli/llama_index/cli/upgrade/__init__.py | llama-index-cli/llama_index/cli/upgrade/__init__.py | from llama_index.cli.upgrade.base import upgrade_dir, upgrade_file
__all__ = ["upgrade_dir", "upgrade_file"]
| 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-cli/llama_index/cli/upgrade/base.py | llama-index-cli/llama_index/cli/upgrade/base.py | import json
import os
import re
from pathlib import Path
from typing import Dict, List, Tuple
mappings_path = os.path.join(os.path.dirname(__file__), "mappings.json")
def _parse_from_imports(
mappings: Dict[str, str],
installed_modules: List[str],
line_idx: int,
lines: List[str],
verbose: bool = ... | 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-cli/llama_index/cli/rag/__init__.py | llama-index-cli/llama_index/cli/rag/__init__.py | from llama_index.cli.rag.base import RagCLI, default_ragcli_persist_dir
__all__ = ["RagCLI", "default_ragcli_persist_dir"]
| 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-cli/llama_index/cli/rag/base.py | llama-index-cli/llama_index/cli/rag/base.py | import asyncio
import os
import shutil
import subprocess
from argparse import ArgumentParser
from glob import iglob
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Union, cast
from llama_index.core import (
Settings,
SimpleDirectoryReader,
VectorStoreIndex,
)
from llama_ind... | 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-cli/llama_index/cli/new_package/__init__.py | llama-index-cli/llama_index/cli/new_package/__init__.py | from llama_index.cli.upgrade.base import upgrade_dir, upgrade_file
__all__ = ["upgrade_dir", "upgrade_file"]
| 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-cli/llama_index/cli/new_package/base.py | llama-index-cli/llama_index/cli/new_package/base.py | import os
import shutil
from pathlib import Path
from llama_index.cli.new_package.templates import (
pyproject_str,
readme_str,
init_str,
init_with_prefix_str,
)
from typing import Optional
def _create_init_file(dir: str):
# create __init__.py
Path(dir + "/__init__.py").touch()
def _create_t... | 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-cli/llama_index/cli/new_package/templates/readme.py | llama-index-cli/llama_index/cli/new_package/templates/readme.py | readme_str = """# LlamaIndex {TYPE} Integration: {NAME}
"""
| 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-cli/llama_index/cli/new_package/templates/pyproject.py | llama-index-cli/llama_index/cli/new_package/templates/pyproject.py | pyproject_str = """[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.codespell]
check-filenames = true
check-hidden = true
# Feel free to un-skip examples, and experimental, you will just need to
# work through many typos (--write-changes and --interactive will help)
skip = "*.c... | 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-cli/llama_index/cli/new_package/templates/__init__.py | llama-index-cli/llama_index/cli/new_package/templates/__init__.py | from llama_index.cli.new_package.templates.pyproject import pyproject_str
from llama_index.cli.new_package.templates.readme import readme_str
from llama_index.cli.new_package.templates.init import (
init_str,
init_with_prefix_str,
)
__all__ = ["pyproject_str", "readme_str", "init_str", "init_with_prefix_str"]
| 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-cli/llama_index/cli/new_package/templates/init.py | llama-index-cli/llama_index/cli/new_package/templates/init.py | init_str = """from llama_index.{TYPE}.{NAME}.base import <FILL>
__all__ = ["<FILL>"]
"""
init_with_prefix_str = """from llama_index.{PREFIX}.{TYPE}.{NAME}.base import <FILL>
__all__ = ["<FILL>"]
"""
| 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-utils/llama-index-utils-azure/llama_index/utils/azure/table.py | llama-index-utils/llama-index-utils-azure/llama_index/utils/azure/table.py | import json
import re
from collections import defaultdict
from datetime import datetime
from enum import Enum
from typing import Any, Tuple, Union
from uuid import UUID
# https://learn.microsoft.com/en-us/rest/api/storageservices/understanding-the-table-service-data-model#table-names
ALPHANUMERIC_REGEX = re.compile(r"... | 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-utils/llama-index-utils-azure/llama_index/utils/azure/__init__.py | llama-index-utils/llama-index-utils-azure/llama_index/utils/azure/__init__.py | from llama_index.utils.azure.table import (
ServiceMode,
deserialize,
sanitize_table_name,
serialize,
)
__all__ = ["ServiceMode", "deserialize", "sanitize_table_name", "serialize"]
| 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-utils/llama-index-utils-huggingface/llama_index/utils/huggingface/__init__.py | llama-index-utils/llama-index-utils-huggingface/llama_index/utils/huggingface/__init__.py | from llama_index.utils.huggingface.base import (
DEFAULT_QUERY_BGE_INSTRUCTION_EN,
BGE_MODELS,
DEFAULT_EMBED_INSTRUCTION,
DEFAULT_HUGGINGFACE_EMBEDDING_MODEL,
DEFAULT_INSTRUCT_MODEL,
DEFAULT_QUERY_BGE_INSTRUCTION_ZH,
DEFAULT_QUERY_INSTRUCTION,
INSTRUCTOR_MODELS,
format_query,
for... | 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-utils/llama-index-utils-huggingface/llama_index/utils/huggingface/base.py | llama-index-utils/llama-index-utils-huggingface/llama_index/utils/huggingface/base.py | from typing import Optional
import requests
DEFAULT_HUGGINGFACE_EMBEDDING_MODEL = "BAAI/bge-small-en"
DEFAULT_INSTRUCT_MODEL = "hkunlp/instructor-base"
# Originally pulled from:
# https://github.com/langchain-ai/langchain/blob/v0.0.257/libs/langchain/langchain/embeddings/huggingface.py#L10
DEFAULT_EMBED_INSTRUCTION ... | 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-utils/llama-index-utils-qianfan/tests/test_apis.py | llama-index-utils/llama-index-utils-qianfan/tests/test_apis.py | import asyncio
from unittest.mock import patch, MagicMock
from typing import List
import httpx
from llama_index.utils.qianfan.apis import (
get_service_list,
aget_service_list,
ServiceItem,
)
mock_service_list_response = {
"log_id": "4102908182",
"success": True,
"result": {
"common":... | 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-utils/llama-index-utils-qianfan/tests/test_authorization.py | llama-index-utils/llama-index-utils-qianfan/tests/test_authorization.py | from llama_index.utils.qianfan.authorization import (
encode_canonical_query,
encode_canonical_headers,
)
def test_encode_canonical_query() -> None:
assert (
encode_canonical_query("text&text1=测试&text10=test")
== "text10=test&text1=%E6%B5%8B%E8%AF%95&text="
)
def test_encode_canonica... | 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-utils/llama-index-utils-qianfan/tests/__init__.py | llama-index-utils/llama-index-utils-qianfan/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-utils/llama-index-utils-qianfan/tests/test_client.py | llama-index-utils/llama-index-utils-qianfan/tests/test_client.py | import json
import asyncio
from unittest.mock import patch, MagicMock
import httpx
from llama_index.utils.qianfan.client import Client
@patch("httpx.Client")
def test_post(mock_client: httpx.Client):
content = {"content": "Hello"}
mock_response = MagicMock()
mock_response.json.return_value = {"echo": c... | 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-utils/llama-index-utils-qianfan/llama_index/utils/qianfan/client.py | llama-index-utils/llama-index-utils-qianfan/llama_index/utils/qianfan/client.py | import json
import logging
import urllib.parse
from typing import Dict, Mapping, Any, Sequence, Union, Tuple, Iterable, AsyncIterable
import httpx
from llama_index.utils.qianfan.authorization import encode_authorization
QueryParamTypes = Union[
Mapping[str, Union[Any, Sequence[Any]]],
Sequence[Tuple[str, An... | 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-utils/llama-index-utils-qianfan/llama_index/utils/qianfan/apis.py | llama-index-utils/llama-index-utils-qianfan/llama_index/utils/qianfan/apis.py | from typing import Sequence, Literal, List
from llama_index.core.bridge.pydantic import BaseModel, Field
from llama_index.utils.qianfan.client import Client
APIType = Literal["chat", "completions", "embeddings", "text2image", "image2text"]
class ServiceItem(BaseModel):
"""
Model service item.
"""
... | 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-utils/llama-index-utils-qianfan/llama_index/utils/qianfan/__init__.py | llama-index-utils/llama-index-utils-qianfan/llama_index/utils/qianfan/__init__.py | from llama_index.utils.qianfan.client import Client
from llama_index.utils.qianfan.apis import APIType, get_service_list, aget_service_list
__all__ = ["Client", "APIType", "get_service_list", "aget_service_list"]
| 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-utils/llama-index-utils-qianfan/llama_index/utils/qianfan/authorization.py | llama-index-utils/llama-index-utils-qianfan/llama_index/utils/qianfan/authorization.py | import hmac
import hashlib
import urllib.parse
from typing import List, Dict, Tuple
from datetime import datetime, timezone
import urllib.parse
def encode_canonical_query(query: str) -> str:
"""
Encoding the HTTP query.
"""
parsed = urllib.parse.parse_qs(query, keep_blank_values=True)
items: List... | 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-utils/llama-index-utils-oracleai/tests/test_utils_oracleai.py | llama-index-utils/llama-index-utils-oracleai/tests/test_utils_oracleai.py | from typing import TYPE_CHECKING
from llama_index.utils.oracleai import OracleSummary
if TYPE_CHECKING:
import oracledb
# unit tests
uname = ""
passwd = ""
v_dsn = ""
### Test OracleSummary #####
# @pytest.mark.requires("oracledb")
def test_summary_test() -> None:
try:
connection = oracledb.connect... | 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-utils/llama-index-utils-oracleai/tests/__init__.py | llama-index-utils/llama-index-utils-oracleai/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-utils/llama-index-utils-oracleai/llama_index/utils/oracleai/__init__.py | llama-index-utils/llama-index-utils-oracleai/llama_index/utils/oracleai/__init__.py | from llama_index.utils.oracleai.base import OracleSummary
__all__ = ["OracleSummary"]
| 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-utils/llama-index-utils-oracleai/llama_index/utils/oracleai/base.py | llama-index-utils/llama-index-utils-oracleai/llama_index/utils/oracleai/base.py | # -----------------------------------------------------------------------------
# Authors:
# Harichandan Roy (hroy)
# David Jiang (ddjiang)
#
# -----------------------------------------------------------------------------
# ...utils/oracleai.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-instrumentation/src/llama_index_instrumentation/__init__.py | llama-index-instrumentation/src/llama_index_instrumentation/__init__.py | import inspect
from abc import ABC
from typing import Any, List
from .dispatcher import (
DISPATCHER_SPAN_DECORATED_ATTR,
Dispatcher,
Manager,
)
from .event_handlers import NullEventHandler
from .span_handlers import NullSpanHandler
root_dispatcher: Dispatcher = Dispatcher(
name="root",
event_hand... | 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-instrumentation/src/llama_index_instrumentation/dispatcher.py | llama-index-instrumentation/src/llama_index_instrumentation/dispatcher.py | import asyncio
import inspect
import logging
import uuid
from contextlib import contextmanager
from contextvars import Context, ContextVar, Token, copy_context
from functools import partial
from typing import Any, Callable, Dict, Generator, List, Optional, Protocol, TypeVar
import wrapt
from deprecated import deprecat... | 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-instrumentation/src/llama_index_instrumentation/base/event.py | llama-index-instrumentation/src/llama_index_instrumentation/base/event.py | from datetime import datetime
from typing import Any, Dict, Optional
from uuid import uuid4
from pydantic import BaseModel, ConfigDict, Field
from llama_index_instrumentation.span import active_span_id
class BaseEvent(BaseModel):
model_config = ConfigDict(
arbitrary_types_allowed=True,
# copy_on... | 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-instrumentation/src/llama_index_instrumentation/base/handler.py | llama-index-instrumentation/src/llama_index_instrumentation/base/handler.py | from abc import ABC, abstractmethod
class BaseInstrumentationHandler(ABC):
@classmethod
@abstractmethod
def init(cls) -> None:
"""Initialize the instrumentation handler."""
| 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-instrumentation/src/llama_index_instrumentation/base/__init__.py | llama-index-instrumentation/src/llama_index_instrumentation/base/__init__.py | from .event import BaseEvent
from .handler import BaseInstrumentationHandler
__all__ = [
"BaseEvent",
"BaseInstrumentationHandler",
]
| 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-instrumentation/src/llama_index_instrumentation/span_handlers/simple.py | llama-index-instrumentation/src/llama_index_instrumentation/span_handlers/simple.py | import inspect
import warnings
from datetime import datetime
from functools import reduce
from typing import TYPE_CHECKING, Any, Dict, List, Optional, cast
from llama_index_instrumentation.span.simple import SimpleSpan
from .base import BaseSpanHandler
if TYPE_CHECKING:
from treelib import Tree
class SimpleSpa... | 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-instrumentation/src/llama_index_instrumentation/span_handlers/__init__.py | llama-index-instrumentation/src/llama_index_instrumentation/span_handlers/__init__.py | from .base import BaseSpanHandler
from .null import NullSpanHandler
from .simple import SimpleSpanHandler
__all__ = [
"BaseSpanHandler",
"NullSpanHandler",
"SimpleSpanHandler",
]
| 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-instrumentation/src/llama_index_instrumentation/span_handlers/null.py | llama-index-instrumentation/src/llama_index_instrumentation/span_handlers/null.py | import inspect
from typing import Any, Dict, Optional
from llama_index_instrumentation.span.base import BaseSpan
from .base import BaseSpanHandler
class NullSpanHandler(BaseSpanHandler[BaseSpan]):
@classmethod
def class_name(cls) -> str:
"""Class name."""
return "NullSpanHandler"
def sp... | 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-instrumentation/src/llama_index_instrumentation/span_handlers/base.py | llama-index-instrumentation/src/llama_index_instrumentation/span_handlers/base.py | import inspect
import threading
from abc import abstractmethod
from contextvars import copy_context
from functools import partial
from typing import Any, Callable, Dict, Generic, List, Optional, Tuple, TypeVar
from pydantic import BaseModel, ConfigDict, Field, PrivateAttr
from llama_index_instrumentation.span.base im... | 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-instrumentation/src/llama_index_instrumentation/span/simple.py | llama-index-instrumentation/src/llama_index_instrumentation/span/simple.py | from datetime import datetime
from typing import Dict, Optional
from pydantic import Field
from .base import BaseSpan
class SimpleSpan(BaseSpan):
"""Simple span class."""
start_time: datetime = Field(default_factory=lambda: datetime.now())
end_time: Optional[datetime] = Field(default=None)
duration... | 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-instrumentation/src/llama_index_instrumentation/span/__init__.py | llama-index-instrumentation/src/llama_index_instrumentation/span/__init__.py | from contextvars import ContextVar
from typing import Optional
from .base import BaseSpan
from .simple import SimpleSpan
# ContextVar for managing active spans
active_span_id: ContextVar[Optional[str]] = ContextVar("active_span_id", default=None)
active_span_id.set(None)
__all__ = ["BaseSpan", "SimpleSpan", "active_... | 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-instrumentation/src/llama_index_instrumentation/span/base.py | llama-index-instrumentation/src/llama_index_instrumentation/span/base.py | from typing import Any, Dict, Optional
from uuid import uuid4
from pydantic import BaseModel, ConfigDict, Field
class BaseSpan(BaseModel):
"""Base data class representing a span."""
model_config = ConfigDict(arbitrary_types_allowed=True)
id_: str = Field(default_factory=lambda: str(uuid4()), description... | 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-instrumentation/src/llama_index_instrumentation/events/span.py | llama-index-instrumentation/src/llama_index_instrumentation/events/span.py | from llama_index_instrumentation.base import BaseEvent
class SpanDropEvent(BaseEvent):
"""
SpanDropEvent.
Args:
err_str (str): Error string.
"""
err_str: str
@classmethod
def class_name(cls) -> str:
"""Class name."""
return "SpanDropEvent"
| 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-instrumentation/src/llama_index_instrumentation/events/__init__.py | llama-index-instrumentation/src/llama_index_instrumentation/events/__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-instrumentation/src/llama_index_instrumentation/event_handlers/__init__.py | llama-index-instrumentation/src/llama_index_instrumentation/event_handlers/__init__.py | from .base import BaseEventHandler
from .null import NullEventHandler
__all__ = ["BaseEventHandler", "NullEventHandler"]
| 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-instrumentation/src/llama_index_instrumentation/event_handlers/null.py | llama-index-instrumentation/src/llama_index_instrumentation/event_handlers/null.py | from typing import Any
from llama_index_instrumentation.base import BaseEvent
from .base import BaseEventHandler
class NullEventHandler(BaseEventHandler):
@classmethod
def class_name(cls) -> str:
"""Class name."""
return "NullEventHandler"
def handle(self, event: BaseEvent, **kwargs: An... | 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-instrumentation/src/llama_index_instrumentation/event_handlers/base.py | llama-index-instrumentation/src/llama_index_instrumentation/event_handlers/base.py | from abc import abstractmethod
from typing import Any
from pydantic import BaseModel, ConfigDict
from llama_index_instrumentation.base import BaseEvent
class BaseEventHandler(BaseModel):
"""Base callback handler that can be used to track event starts and ends."""
model_config = ConfigDict(arbitrary_types_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-instrumentation/tests/test_manager.py | llama-index-instrumentation/tests/test_manager.py | import llama_index_instrumentation as instrument
def test_root_manager_add_dispatcher():
# arrange
root_manager = instrument.root_manager
# act
dispatcher = instrument.get_dispatcher("test")
# assert
assert "root" in root_manager.dispatchers
assert "test" in root_manager.dispatchers
| 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-instrumentation/tests/test_dispatcher.py | llama-index-instrumentation/tests/test_dispatcher.py | import asyncio
import inspect
import threading
import time
from abc import abstractmethod
from asyncio import (
AbstractEventLoop,
CancelledError,
Queue,
gather,
get_event_loop,
sleep,
)
from collections import Counter
from concurrent.futures import ThreadPoolExecutor
from random import random
f... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | true |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/__init__.py | llama-datasets/__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-datasets/mini_truthfulqa/llamaindex_baseline.py | llama-datasets/mini_truthfulqa/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("MiniTruthfulQADataset", "./data... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/mini_esg_bench/llamaindex_baseline.py | llama-datasets/mini_esg_bench/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("MiniEsgBenchDataset", "./data")... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/mt_bench_humanjudgement/baselines.py | llama-datasets/mt_bench_humanjudgement/baselines.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core.evaluation import PairwiseComparisonEvaluator
from llama_index.llms import OpenAI, Gemini
from llama_index.core import ServiceContext
import pandas as pd
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/blockchain_solana/llamaindex_baseline.py | llama-datasets/blockchain_solana/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset(
"BlockchainSolanaDatase... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/patronus_financebench/llamaindex_baseline.py | llama-datasets/patronus_financebench/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset(
"PatronusAIFinanceBench... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/patronus_financebench/__init__.py | llama-datasets/patronus_financebench/__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-datasets/origin_of_covid19/llamaindex_baseline.py | llama-datasets/origin_of_covid19/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("OriginOfCovid19", "./data")
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/mini_mt_bench_singlegrading/baselines.py | llama-datasets/mini_mt_bench_singlegrading/baselines.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core.evaluation import CorrectnessEvaluator
from llama_index.llms import OpenAI, Gemini
from llama_index.core import ServiceContext
import pandas as pd
async d... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/braintrust_coda/llamaindex_baseline.py | llama-datasets/braintrust_coda/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset(
"BraintrustCodaHelpDesk... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/braintrust_coda/__init__.py | llama-datasets/braintrust_coda/__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-datasets/10k/uber_2021/llamaindex_baseline.py | llama-datasets/10k/uber_2021/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
from llama_index.llms import OpenAI
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_data... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/paul_graham_essay/llamaindex_baseline.py | llama-datasets/paul_graham_essay/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset(
"PaulGrahamEssayDataset... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/paul_graham_essay/__init__.py | llama-datasets/paul_graham_essay/__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-datasets/mini_covidqa/llamaindex_baseline.py | llama-datasets/mini_covidqa/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("MiniCovidQaDataset", "./data")
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/covidqa/llamaindex_baseline.py | llama-datasets/covidqa/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("CovidQaDataset", "./data")
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/docugami_kg_rag/sec_10_q/llamaindex_baseline.py | llama-datasets/docugami_kg_rag/sec_10_q/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
from llama_index.llms import OpenAI
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_data... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/eval_llm_survey_paper/llamaindex_baseline.py | llama-datasets/eval_llm_survey_paper/llamaindex_baseline.py | from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset(
"EvaluatingLlmSurveyPaperDataset", "./d... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/llama2_paper/llamaindex_baseline.py | llama-datasets/llama2_paper/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("Llama2PaperDataset", "./data")
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/llama2_paper/__init__.py | llama-datasets/llama2_paper/__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-datasets/mini_squadv2/llamaindex_baseline.py | llama-datasets/mini_squadv2/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("MiniSquadV2Dataset", "./data")
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-datasets/history_of_alexnet/llamaindex_baseline.py | llama-datasets/history_of_alexnet/llamaindex_baseline.py | import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("HistoryOfAlexnetDataset", "./da... | 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/llama_index/_bundle/__init__.py | _llama-index/llama_index/_bundle/__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/docs/scripts/prepare_for_build.py | docs/scripts/prepare_for_build.py | # /// script
# dependencies = [
# "toml",
# "pyaml",
# ]
# ///
import os
import toml
import yaml
MKDOCS_YML = "./api_reference/mkdocs.yml"
# examples config
EXAMPLES_DIR = "./examples"
FOLDER_NAME_TO_LABEL = {
"./examples/agent": "Agents",
"./examples/cookbooks": "Cookbooks",
"./examples/chat_engine... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/docs/examples/output_parsing/directory.py | docs/examples/output_parsing/directory.py | import enum
from typing import List
from llama_index.core.bridge.pydantic import BaseModel, Field
class NodeType(str, enum.Enum):
"""Enumeration representing the types of nodes in a filesystem."""
FILE = "file"
FOLDER = "folder"
class Node(BaseModel):
"""
Class representing a single node in a ... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/docs/examples/discover_llamaindex/document_management/group_conversations.py | docs/examples/discover_llamaindex/document_management/group_conversations.py | import json
import sys
class Message:
def __init__(
self,
message_id,
message_text,
author,
timestamp,
parent_message=None,
child_message=None,
):
self.message_id = message_id
self.message_text = message_text
self.author = author
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/docs/examples/finetuning/embeddings/eval_utils.py | docs/examples/finetuning/embeddings/eval_utils.py | from llama_index.core.schema import TextNode
from llama_index.core import Settings
from llama_index.core import VectorStoreIndex
import pandas as pd
from tqdm import tqdm
def evaluate(
dataset,
embed_model,
top_k=5,
verbose=False,
):
corpus = dataset.corpus
queries = dataset.queries
releva... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-dev/llama_dev/cli.py | llama-dev/llama_dev/cli.py | from pathlib import Path
import click
from rich.console import Console
from rich.theme import Theme
from .pkg import pkg
from .release import release
from .test import test
LLAMA_DEV_THEME = Theme(
{
"repr.path": "",
"repr.filename": "",
"repr.str": "",
"traceback.note": "cyan",
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-dev/llama_dev/__main__.py | llama-dev/llama_dev/__main__.py | from .cli import cli
if __name__ == "__main__":
cli()
| python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-dev/llama_dev/utils.py | llama-dev/llama_dev/utils.py | import re
import subprocess
import sys
from enum import Enum
from pathlib import Path
import tomli
from packaging import specifiers, version
from packaging.version import Version
DEP_NAME_REGEX = re.compile(r"([^<>=\[\];\s]+)")
class BumpType(str, Enum):
MAJOR = "major"
MINOR = "minor"
PATCH = "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-dev/llama_dev/__init__.py | llama-dev/llama_dev/__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-dev/llama_dev/release/check.py | llama-dev/llama_dev/release/check.py | import json
import subprocess
import urllib.request
from pathlib import Path
import click
import tomli
from packaging.version import parse as parse_version
def _get_current_branch_name() -> str:
return (
subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"])
.decode("utf-8")
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-dev/llama_dev/release/prepare.py | llama-dev/llama_dev/release/prepare.py | from pathlib import Path
import click
from llama_dev.utils import (
BumpType,
bump_version,
load_pyproject,
update_pyproject_version,
)
def _replace_core_dependency(project_path: Path, old_dep: str, new_dep: str):
pyproject_path = project_path / "pyproject.toml"
# Read the file content
w... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-dev/llama_dev/release/__init__.py | llama-dev/llama_dev/release/__init__.py | import click
from .changelog import changelog
from .check import check
from .prepare import prepare
@click.group(short_help="Utilities for the release process in the monorepo")
def release():
pass # pragma: no cover
release.add_command(check)
release.add_command(changelog)
release.add_command(prepare)
| 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.