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-core/llama_index/core/node_parser/text/sentence.py
llama-index-core/llama_index/core/node_parser/text/sentence.py
"""Sentence splitter.""" from dataclasses import dataclass from typing import Callable, List, Optional, Tuple from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.callbacks.base import CallbackManager from llama_index.core.callbacks.schema import CBEventType, EventPayload from llama_i...
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-core/llama_index/core/node_parser/text/token.py
llama-index-core/llama_index/core/node_parser/text/token.py
"""Token splitter.""" import logging from typing import Callable, List, Optional from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.callbacks.base import CallbackManager from llama_index.core.callbacks.schema import CBEventType, EventPayload from llama_index.core.constants import DE...
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-core/llama_index/core/node_parser/text/code.py
llama-index-core/llama_index/core/node_parser/text/code.py
"""Code splitter.""" from typing import Any, Callable, List, Optional from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.callbacks.base import CallbackManager from llama_index.core.callbacks.schema import CBEventType, EventPayload from llama_index.core.node_parser.interface import 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-core/llama_index/core/node_parser/text/utils.py
llama-index-core/llama_index/core/node_parser/text/utils.py
import logging from typing import Any, Callable, List from llama_index.core.node_parser.interface import TextSplitter from llama_index.core.utils import globals_helper logger = logging.getLogger(__name__) def truncate_text(text: str, text_splitter: TextSplitter) -> str: """ Truncate text to fit within the 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-core/llama_index/core/node_parser/text/semantic_double_merging_splitter.py
llama-index-core/llama_index/core/node_parser/text/semantic_double_merging_splitter.py
import re import string from typing import Any, Callable, Dict, List, Optional, Sequence from llama_index.core.node_parser.interface import NodeParser from llama_index.core.bridge.pydantic import Field from llama_index.core.callbacks.base import CallbackManager from llama_index.core.node_parser import NodeParser 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-core/llama_index/core/node_parser/text/__init__.py
llama-index-core/llama_index/core/node_parser/text/__init__.py
from llama_index.core.node_parser.text.code import CodeSplitter from llama_index.core.node_parser.text.langchain import LangchainNodeParser from llama_index.core.node_parser.text.semantic_splitter import ( SemanticSplitterNodeParser, ) from llama_index.core.node_parser.text.sentence import SentenceSplitter from lla...
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-core/llama_index/core/node_parser/text/langchain.py
llama-index-core/llama_index/core/node_parser/text/langchain.py
from typing import TYPE_CHECKING, Callable, List, Optional from llama_index.core.bridge.pydantic import PrivateAttr from llama_index.core.callbacks import CallbackManager from llama_index.core.node_parser.interface import TextSplitter from llama_index.core.node_parser.node_utils import default_id_func 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-core/llama_index/core/node_parser/text/sentence_window.py
llama-index-core/llama_index/core/node_parser/text/sentence_window.py
"""Simple node parser.""" from typing import Any, Callable, List, Optional, Sequence from llama_index.core.bridge.pydantic import Field from llama_index.core.callbacks.base import CallbackManager from llama_index.core.node_parser.interface import NodeParser from llama_index.core.node_parser.node_utils import ( bu...
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-core/llama_index/core/storage/storage_context.py
llama-index-core/llama_index/core/storage/storage_context.py
import os from dataclasses import dataclass from pathlib import Path from typing import Dict, Optional, Union import fsspec from llama_index.core.constants import ( DOC_STORE_KEY, GRAPH_STORE_KEY, INDEX_STORE_KEY, VECTOR_STORE_KEY, PG_STORE_KEY, ) from llama_index.core.graph_stores.simple import ( ...
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-core/llama_index/core/storage/__init__.py
llama-index-core/llama_index/core/storage/__init__.py
"""Storage classes.""" from llama_index.core.storage.storage_context import StorageContext __all__ = [ "StorageContext", ]
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-core/llama_index/core/storage/kvstore/__init__.py
llama-index-core/llama_index/core/storage/kvstore/__init__.py
from llama_index.core.storage.kvstore.simple_kvstore import SimpleKVStore __all__ = ["FirestoreKVStore", "SimpleKVStore", "MongoDBKVStore", "RedisKVStore"]
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-core/llama_index/core/storage/kvstore/types.py
llama-index-core/llama_index/core/storage/kvstore/types.py
from abc import ABC, abstractmethod from collections.abc import MutableMapping, Callable from typing import Dict, List, Optional, Tuple, TypeVar, Generic import fsspec DEFAULT_COLLECTION = "data" DEFAULT_BATCH_SIZE = 1 class BaseKVStore(ABC): """Base key-value store.""" @abstractmethod def put(self, ke...
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-core/llama_index/core/storage/kvstore/simple_kvstore.py
llama-index-core/llama_index/core/storage/kvstore/simple_kvstore.py
import json import logging import os from typing import Dict, Optional import fsspec from llama_index.core.storage.kvstore.types import ( MutableMappingKVStore, ) logger = logging.getLogger(__name__) DATA_TYPE = Dict[str, Dict[str, dict]] class SimpleKVStore(MutableMappingKVStore[dict]): """ Simple in-...
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-core/llama_index/core/storage/index_store/keyval_index_store.py
llama-index-core/llama_index/core/storage/index_store/keyval_index_store.py
from typing import List, Optional from llama_index.core.data_structs.data_structs import IndexStruct from llama_index.core.storage.index_store.types import BaseIndexStore from llama_index.core.storage.index_store.utils import ( index_struct_to_json, json_to_index_struct, ) from llama_index.core.storage.kvstore...
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-core/llama_index/core/storage/index_store/utils.py
llama-index-core/llama_index/core/storage/index_store/utils.py
from llama_index.core.constants import DATA_KEY, TYPE_KEY from llama_index.core.data_structs.data_structs import IndexStruct from llama_index.core.data_structs.registry import ( INDEX_STRUCT_TYPE_TO_INDEX_STRUCT_CLASS, ) def index_struct_to_json(index_struct: IndexStruct) -> dict: return { TYPE_KEY: i...
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-core/llama_index/core/storage/index_store/__init__.py
llama-index-core/llama_index/core/storage/index_store/__init__.py
from llama_index.core.storage.index_store.simple_index_store import ( SimpleIndexStore, ) __all__ = [ "SimpleIndexStore", ]
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-core/llama_index/core/storage/index_store/types.py
llama-index-core/llama_index/core/storage/index_store/types.py
import os from abc import ABC, abstractmethod from typing import List, Optional import fsspec from llama_index.core.data_structs.data_structs import IndexStruct DEFAULT_PERSIST_DIR = "./storage" DEFAULT_PERSIST_FNAME = "index_store.json" DEFAULT_PERSIST_PATH = os.path.join(DEFAULT_PERSIST_DIR, DEFAULT_PERSIST_FNAME) ...
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-core/llama_index/core/storage/index_store/simple_index_store.py
llama-index-core/llama_index/core/storage/index_store/simple_index_store.py
import os from typing import Optional import fsspec from llama_index.core.storage.index_store.keyval_index_store import KVIndexStore from llama_index.core.storage.index_store.types import ( DEFAULT_PERSIST_DIR, DEFAULT_PERSIST_FNAME, DEFAULT_PERSIST_PATH, ) from llama_index.core.storage.kvstore.simple_kvst...
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-core/llama_index/core/storage/chat_store/sql.py
llama-index-core/llama_index/core/storage/chat_store/sql.py
import time from typing import Any, Dict, List, Optional, Tuple from sqlalchemy import ( JSON, Column, BigInteger, Integer, MetaData, String, Table, delete, select, insert, update, text, ) from sqlalchemy.ext.asyncio import ( AsyncEngine, AsyncSession, create...
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-core/llama_index/core/storage/chat_store/base_db.py
llama-index-core/llama_index/core/storage/chat_store/base_db.py
from abc import abstractmethod from typing import List, Optional from enum import Enum from llama_index.core.base.llms.types import ChatMessage from llama_index.core.bridge.pydantic import BaseModel class MessageStatus(str, Enum): """Status of a message in the chat store.""" # Message is in the active FIFO ...
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-core/llama_index/core/storage/chat_store/simple_chat_store.py
llama-index-core/llama_index/core/storage/chat_store/simple_chat_store.py
import json import os from typing import Any, Dict, List, Optional from typing_extensions import Annotated import fsspec from llama_index.core.bridge.pydantic import Field, WrapSerializer from llama_index.core.llms import ChatMessage from llama_index.core.storage.chat_store.base import BaseChatStore def chat_message...
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-core/llama_index/core/storage/chat_store/loading.py
llama-index-core/llama_index/core/storage/chat_store/loading.py
from llama_index.core.storage.chat_store.base import BaseChatStore from llama_index.core.storage.chat_store.simple_chat_store import SimpleChatStore RECOGNIZED_CHAT_STORES = { SimpleChatStore.class_name(): SimpleChatStore, } def load_chat_store(data: dict) -> BaseChatStore: """Load a chat store from a dict."...
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-core/llama_index/core/storage/chat_store/__init__.py
llama-index-core/llama_index/core/storage/chat_store/__init__.py
from llama_index.core.storage.chat_store.base import BaseChatStore from llama_index.core.storage.chat_store.simple_chat_store import SimpleChatStore __all__ = ["BaseChatStore", "SimpleChatStore"]
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-core/llama_index/core/storage/chat_store/base.py
llama-index-core/llama_index/core/storage/chat_store/base.py
"""Base interface class for storing chat history per user.""" import asyncio from abc import abstractmethod from typing import List, Optional from llama_index.core.llms import ChatMessage from llama_index.core.schema import BaseComponent class BaseChatStore(BaseComponent): @classmethod def class_name(cls) -...
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-core/llama_index/core/storage/docstore/registry.py
llama-index-core/llama_index/core/storage/docstore/registry.py
from enum import Enum from typing import Dict, Type from llama_index.core.storage.docstore.simple_docstore import SimpleDocumentStore from llama_index.core.storage.docstore.types import BaseDocumentStore class DocumentStoreType(str, Enum): MONGO = "mongo" SIMPLE = "simple" DOCSTORE_TYPE_TO_CLASS: Dict[Docu...
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-core/llama_index/core/storage/docstore/keyval_docstore.py
llama-index-core/llama_index/core/storage/docstore/keyval_docstore.py
"""Document store.""" import asyncio from typing import Any, Dict, List, Optional, Sequence, Tuple from llama_index.core.schema import BaseNode from llama_index.core.storage.docstore.types import BaseDocumentStore, RefDocInfo from llama_index.core.storage.docstore.utils import doc_to_json, json_to_doc from llama_inde...
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-core/llama_index/core/storage/docstore/utils.py
llama-index-core/llama_index/core/storage/docstore/utils.py
from llama_index.core.constants import DATA_KEY, TYPE_KEY from llama_index.core.schema import ( BaseNode, Document, ImageDocument, ImageNode, IndexNode, Node, NodeRelationship, RelatedNodeInfo, TextNode, ) def doc_to_json(doc: BaseNode) -> dict: return { DATA_KEY: doc.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-core/llama_index/core/storage/docstore/__init__.py
llama-index-core/llama_index/core/storage/docstore/__init__.py
# alias for backwards compatibility from llama_index.core.storage.docstore.simple_docstore import ( DocumentStore, SimpleDocumentStore, ) from llama_index.core.storage.docstore.types import BaseDocumentStore __all__ = [ "BaseDocumentStore", "DocumentStore", "SimpleDocumentStore", ]
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-core/llama_index/core/storage/docstore/types.py
llama-index-core/llama_index/core/storage/docstore/types.py
import os from abc import ABC, abstractmethod from dataclasses import dataclass, field from typing import Any, Dict, List, Literal, Optional, Sequence, overload import fsspec from dataclasses_json import DataClassJsonMixin from llama_index.core.schema import BaseNode from llama_index.core.storage.kvstore.types import ...
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-core/llama_index/core/storage/docstore/simple_docstore.py
llama-index-core/llama_index/core/storage/docstore/simple_docstore.py
import os from typing import Optional import fsspec from llama_index.core.storage.docstore.keyval_docstore import KVDocumentStore from llama_index.core.storage.docstore.types import ( DEFAULT_BATCH_SIZE, DEFAULT_PERSIST_DIR, DEFAULT_PERSIST_FNAME, DEFAULT_PERSIST_PATH, ) from llama_index.core.storage.k...
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-core/llama_index/core/query_engine/sub_question_query_engine.py
llama-index-core/llama_index/core/query_engine/sub_question_query_engine.py
import asyncio import logging from typing import List, Optional, Sequence, cast from llama_index.core.async_utils import run_async_tasks from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import RESPONSE_TYPE from llama_index.core.bridge.pydantic import BaseM...
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-core/llama_index/core/query_engine/knowledge_graph_query_engine.py
llama-index-core/llama_index/core/query_engine/knowledge_graph_query_engine.py
"""Knowledge Graph Query Engine.""" import deprecated import logging from typing import Any, Dict, List, Optional, Sequence from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import RESPONSE_TYPE from llama_index.core.callbacks.schema import CBEventType, Eve...
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-core/llama_index/core/query_engine/retry_source_query_engine.py
llama-index-core/llama_index/core/query_engine/retry_source_query_engine.py
import logging from typing import Optional from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import ( AsyncStreamingResponse, RESPONSE_TYPE, Response, ) from llama_index.core.callbacks.base import CallbackManager from llama_index.core.evaluation ...
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-core/llama_index/core/query_engine/graph_query_engine.py
llama-index-core/llama_index/core/query_engine/graph_query_engine.py
from typing import Any, Dict, List, Optional, Tuple from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import RESPONSE_TYPE from llama_index.core.callbacks.schema import CBEventType, EventPayload from llama_index.core.indices.composability.graph import Compos...
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-core/llama_index/core/query_engine/sql_join_query_engine.py
llama-index-core/llama_index/core/query_engine/sql_join_query_engine.py
"""SQL Join query engine.""" import logging from typing import Callable, Dict, Optional, Union from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import ( RESPONSE_TYPE, Response, StreamingResponse, ) from llama_index.core.callbacks.base import 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-core/llama_index/core/query_engine/citation_query_engine.py
llama-index-core/llama_index/core/query_engine/citation_query_engine.py
from typing import Any, List, Optional, Sequence from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.base_retriever import BaseRetriever from llama_index.core.base.response.schema import RESPONSE_TYPE from llama_index.core.callbacks.base import CallbackManager from llama_inde...
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-core/llama_index/core/query_engine/multistep_query_engine.py
llama-index-core/llama_index/core/query_engine/multistep_query_engine.py
from typing import Any, Callable, Dict, List, Optional, Tuple, cast from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import RESPONSE_TYPE from llama_index.core.callbacks.schema import CBEventType, EventPayload from llama_index.core.indices.query.query_trans...
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-core/llama_index/core/query_engine/router_query_engine.py
llama-index-core/llama_index/core/query_engine/router_query_engine.py
import logging from typing import Callable, Generator, List, Optional, Sequence, Any from llama_index.core.async_utils import run_async_tasks from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.base_retriever import BaseRetriever from llama_index.core.base.base_selector 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-core/llama_index/core/query_engine/sql_vector_query_engine.py
llama-index-core/llama_index/core/query_engine/sql_vector_query_engine.py
"""SQL Vector query engine.""" import logging from typing import Any, Optional, Union from llama_index.core.callbacks.base import CallbackManager from llama_index.core.indices.struct_store.sql_query import ( BaseSQLTableQueryEngine, NLSQLTableQueryEngine, ) from llama_index.core.indices.vector_store.retriever...
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-core/llama_index/core/query_engine/retriever_query_engine.py
llama-index-core/llama_index/core/query_engine/retriever_query_engine.py
from typing import Any, List, Optional, Sequence, Type from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.base_retriever import BaseRetriever from llama_index.core.base.response.schema import RESPONSE_TYPE from llama_index.core.bridge.pydantic import BaseModel 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-core/llama_index/core/query_engine/__init__.py
llama-index-core/llama_index/core/query_engine/__init__.py
from llama_index.core.base.base_query_engine import BaseQueryEngine # SQL from llama_index.core.indices.struct_store.sql_query import ( NLSQLTableQueryEngine, PGVectorSQLQueryEngine, SQLTableRetrieverQueryEngine, ) from llama_index.core.query_engine.citation_query_engine import CitationQueryEngine from lla...
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-core/llama_index/core/query_engine/retry_query_engine.py
llama-index-core/llama_index/core/query_engine/retry_query_engine.py
import logging from typing import Optional from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import ( RESPONSE_TYPE, Response, AsyncStreamingResponse, ) from llama_index.core.callbacks.base import CallbackManager from llama_index.core.evaluation....
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-core/llama_index/core/query_engine/cogniswitch_query_engine.py
llama-index-core/llama_index/core/query_engine/cogniswitch_query_engine.py
from typing import Any, Dict import requests from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import Response from llama_index.core.schema import QueryBundle class CogniswitchQueryEngine(BaseQueryEngine): def __init__(self, cs_token: str, OAI_token: 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-core/llama_index/core/query_engine/multi_modal.py
llama-index-core/llama_index/core/query_engine/multi_modal.py
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Tuple, Union from llama_index.core.base.response.schema import RESPONSE_TYPE, Response from llama_index.core.callbacks.base import CallbackManager from llama_index.core.callbacks.schema import CBEventType, EventPayload from llama_index.core.indices...
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-core/llama_index/core/query_engine/custom.py
llama-index-core/llama_index/core/query_engine/custom.py
"""Custom query engine.""" from abc import abstractmethod from typing import Union from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import RESPONSE_TYPE, Response from llama_index.core.bridge.pydantic import BaseModel, Field, ConfigDict from llama_index.co...
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-core/llama_index/core/query_engine/transform_query_engine.py
llama-index-core/llama_index/core/query_engine/transform_query_engine.py
from typing import List, Optional, Sequence from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import RESPONSE_TYPE from llama_index.core.callbacks.base import CallbackManager from llama_index.core.indices.query.query_transform.base import BaseQueryTransform ...
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-core/llama_index/core/query_engine/jsonalyze/jsonalyze_query_engine.py
llama-index-core/llama_index/core/query_engine/jsonalyze/jsonalyze_query_engine.py
""" JSONalyze Query Engine. WARNING: This tool executes a SQL prompt generated by the LLM with SQL Lite and may lead to arbitrary file creation on the machine running this tool. This tool is not recommended to be used in a production setting, and would require heavy sandboxing or virtual machines. DEPRECATED: Use `JS...
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-core/llama_index/core/query_engine/jsonalyze/__init__.py
llama-index-core/llama_index/core/query_engine/jsonalyze/__init__.py
"""Init file.""" from llama_index.core.query_engine.jsonalyze.jsonalyze_query_engine import ( JSONalyzeQueryEngine, ) __all__ = ["JSONalyzeQueryEngine"]
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-core/llama_index/core/query_engine/pandas/output_parser.py
llama-index-core/llama_index/core/query_engine/pandas/output_parser.py
""" Pandas output parser. DEPRECATED: This class has been moved to `llama-index-experimental`. """ from typing import Any class PandasInstructionParser: """ Pandas instruction parser. DEPRECATED: This class has been moved to `llama-index-experimental`. """ def __init__(self, *args: Any, **kwa...
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-core/llama_index/core/query_engine/pandas/__init__.py
llama-index-core/llama_index/core/query_engine/pandas/__init__.py
"""Init file.""" from llama_index.core.query_engine.pandas.output_parser import ( PandasInstructionParser, ) from llama_index.core.query_engine.pandas.pandas_query_engine import ( PandasQueryEngine, ) __all__ = ["PandasInstructionParser", "PandasQueryEngine"]
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-core/llama_index/core/query_engine/pandas/pandas_query_engine.py
llama-index-core/llama_index/core/query_engine/pandas/pandas_query_engine.py
""" Default query for PandasIndex. WARNING: This tool provides the LLM access to the `eval` function. Arbitrary code execution is possible on the machine running this tool. This tool is not recommended to be used in a production setting, and would require heavy sandboxing or virtual machines. DEPRECATED: Use `PandasQ...
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-core/llama_index/core/query_engine/flare/answer_inserter.py
llama-index-core/llama_index/core/query_engine/flare/answer_inserter.py
"""Answer inserter.""" from abc import abstractmethod from typing import Any, Dict, List, Optional from llama_index.core.llms.llm import LLM from llama_index.core.prompts.base import BasePromptTemplate, PromptTemplate from llama_index.core.prompts.mixin import ( PromptDictType, PromptMixin, PromptMixinTyp...
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-core/llama_index/core/query_engine/flare/schema.py
llama-index-core/llama_index/core/query_engine/flare/schema.py
"""FLARE schema.""" from dataclasses import dataclass @dataclass class QueryTask: """Query task.""" query_str: str start_idx: int end_idx: int
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-core/llama_index/core/query_engine/flare/output_parser.py
llama-index-core/llama_index/core/query_engine/flare/output_parser.py
"""FLARE output parsers.""" from typing import Any, Callable, Optional from llama_index.core.query_engine.flare.schema import QueryTask from llama_index.core.types import BaseOutputParser def default_parse_is_done_fn(response: str) -> bool: """Default parse is done function.""" return "done" in response.low...
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-core/llama_index/core/query_engine/flare/__init__.py
llama-index-core/llama_index/core/query_engine/flare/__init__.py
"""Init params."""
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-core/llama_index/core/query_engine/flare/base.py
llama-index-core/llama_index/core/query_engine/flare/base.py
""" Query engines based on the FLARE paper. Active Retrieval Augmented Generation. """ from typing import Any, Dict, Optional, List from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import RESPONSE_TYPE, Response from llama_index.core.callbacks.base 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-core/llama_index/core/response_synthesizers/compact_and_accumulate.py
llama-index-core/llama_index/core/response_synthesizers/compact_and_accumulate.py
from typing import Any, Sequence from llama_index.core.response_synthesizers import Accumulate from llama_index.core.types import RESPONSE_TEXT_TYPE from llama_index.core.utils import temp_set_attrs class CompactAndAccumulate(Accumulate): """Accumulate responses across compact text chunks.""" async def aget...
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-core/llama_index/core/response_synthesizers/refine.py
llama-index-core/llama_index/core/response_synthesizers/refine.py
import logging from typing import ( Any, Callable, Generator, Optional, Sequence, Type, cast, AsyncGenerator, ) from llama_index.core.bridge.pydantic import BaseModel, Field, ValidationError from llama_index.core.callbacks.base import CallbackManager from llama_index.core.indices.prompt...
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-core/llama_index/core/response_synthesizers/context_only.py
llama-index-core/llama_index/core/response_synthesizers/context_only.py
from typing import Any, Sequence from llama_index.core.prompts.mixin import PromptDictType from llama_index.core.response_synthesizers.base import BaseSynthesizer from llama_index.core.types import RESPONSE_TEXT_TYPE class ContextOnly(BaseSynthesizer): def _get_prompts(self) -> PromptDictType: """Get pro...
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-core/llama_index/core/response_synthesizers/type.py
llama-index-core/llama_index/core/response_synthesizers/type.py
from enum import Enum class ResponseMode(str, Enum): """Response modes of the response builder (and synthesizer).""" REFINE = "refine" """ Refine is an iterative way of generating a response. We first use the context in the first node, along with the query, to generate an \ initial answer. ...
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-core/llama_index/core/response_synthesizers/no_text.py
llama-index-core/llama_index/core/response_synthesizers/no_text.py
from typing import Any, Sequence from llama_index.core.prompts.mixin import PromptDictType from llama_index.core.response_synthesizers.base import BaseSynthesizer from llama_index.core.types import RESPONSE_TEXT_TYPE class NoText(BaseSynthesizer): def _get_prompts(self) -> PromptDictType: """Get prompts....
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-core/llama_index/core/response_synthesizers/compact_and_refine.py
llama-index-core/llama_index/core/response_synthesizers/compact_and_refine.py
from typing import Any, List, Optional, Sequence from llama_index.core.prompts.prompt_utils import get_biggest_prompt from llama_index.core.response_synthesizers.refine import Refine from llama_index.core.types import RESPONSE_TEXT_TYPE import llama_index.core.instrumentation as instrument dispatcher = instrument.get...
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-core/llama_index/core/response_synthesizers/factory.py
llama-index-core/llama_index/core/response_synthesizers/factory.py
from typing import Callable, Optional, Type from llama_index.core.bridge.pydantic import BaseModel from llama_index.core.callbacks.base import CallbackManager from llama_index.core.indices.prompt_helper import PromptHelper from llama_index.core.prompts import BasePromptTemplate from llama_index.core.prompts.default_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-core/llama_index/core/response_synthesizers/__init__.py
llama-index-core/llama_index/core/response_synthesizers/__init__.py
"""Init file.""" from llama_index.core.response_synthesizers.accumulate import Accumulate from llama_index.core.response_synthesizers.base import BaseSynthesizer from llama_index.core.response_synthesizers.compact_and_refine import ( CompactAndRefine, ) from llama_index.core.response_synthesizers.factory import ge...
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-core/llama_index/core/response_synthesizers/accumulate.py
llama-index-core/llama_index/core/response_synthesizers/accumulate.py
import asyncio from typing import Any, Callable, List, Optional, Sequence, Type from llama_index.core.async_utils import run_async_tasks from llama_index.core.bridge.pydantic import BaseModel from llama_index.core.callbacks.base import CallbackManager from llama_index.core.indices.prompt_helper import PromptHelper fro...
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-core/llama_index/core/response_synthesizers/base.py
llama-index-core/llama_index/core/response_synthesizers/base.py
""" Response builder class. This class provides general functions for taking in a set of text and generating a response. Will support different modes, from 1) stuffing chunks into prompt, 2) create and refine separately over each chunk, 3) tree summarization. """ import logging from abc import abstractmethod from 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-core/llama_index/core/response_synthesizers/simple_summarize.py
llama-index-core/llama_index/core/response_synthesizers/simple_summarize.py
from typing import Any, Generator, Optional, Sequence, cast from llama_index.core.callbacks.base import CallbackManager from llama_index.core.indices.prompt_helper import PromptHelper from llama_index.core.llms import LLM from llama_index.core.prompts import BasePromptTemplate from llama_index.core.prompts.default_pro...
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-core/llama_index/core/response_synthesizers/generation.py
llama-index-core/llama_index/core/response_synthesizers/generation.py
from typing import Any, List, Optional, Sequence from llama_index.core.base.response.schema import RESPONSE_TYPE from llama_index.core.callbacks.base import CallbackManager from llama_index.core.callbacks.schema import CBEventType, EventPayload from llama_index.core.indices.prompt_helper import PromptHelper from llama...
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-core/llama_index/core/response_synthesizers/tree_summarize.py
llama-index-core/llama_index/core/response_synthesizers/tree_summarize.py
import asyncio from typing import Any, Optional, Sequence, Type from llama_index.core.async_utils import run_async_tasks from llama_index.core.callbacks.base import CallbackManager from llama_index.core.indices.prompt_helper import PromptHelper from llama_index.core.llms import LLM from llama_index.core.prompts import...
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-core/llama_index/core/ingestion/data_sources.py
llama-index-core/llama_index/core/ingestion/data_sources.py
import uuid from enum import Enum from pathlib import Path from typing import Any, Generic, Iterable, List, Optional, Type, TypeVar, cast from llama_index.core.bridge.pydantic import ( BaseModel, Field, ValidationError, ) from llama_index.core.readers.base import BasePydanticReader, ReaderConfig from llama...
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-core/llama_index/core/ingestion/transformations.py
llama-index-core/llama_index/core/ingestion/transformations.py
""" This module maintains the list of transformations that are supported by the system. """ from enum import Enum from typing import Generic, Sequence, Type, TypeVar from llama_index.core.bridge.pydantic import ( BaseModel, Field, ValidationError, SerializeAsAny, ) from llama_index.core.node_parser 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-core/llama_index/core/ingestion/pipeline.py
llama-index-core/llama_index/core/ingestion/pipeline.py
import asyncio import multiprocessing import os import re import warnings from concurrent.futures import ProcessPoolExecutor from enum import Enum from functools import partial, reduce from hashlib import sha256 from itertools import repeat from pathlib import Path from typing import Any, Generator, List, Optional, Seq...
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-core/llama_index/core/ingestion/__init__.py
llama-index-core/llama_index/core/ingestion/__init__.py
from llama_index.core.ingestion.cache import IngestionCache from llama_index.core.ingestion.pipeline import ( DocstoreStrategy, IngestionPipeline, arun_transformations, run_transformations, ) __all__ = [ "DocstoreStrategy", "IngestionCache", "IngestionPipeline", "run_transformations", ...
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-core/llama_index/core/ingestion/data_sinks.py
llama-index-core/llama_index/core/ingestion/data_sinks.py
from enum import Enum from typing import Generic, Type, TypeVar from llama_index.core.bridge.pydantic import ( BaseModel, Field, ValidationError, ) from llama_index.core.vector_stores.types import BasePydanticVectorStore class DataSink(BaseModel): """ A class containing metadata for a type of dat...
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-core/llama_index/core/ingestion/cache.py
llama-index-core/llama_index/core/ingestion/cache.py
from typing import Optional, Sequence import fsspec from llama_index.core.bridge.pydantic import BaseModel, Field, ConfigDict from llama_index.core.schema import BaseNode from llama_index.core.storage.docstore.utils import doc_to_json, json_to_doc from llama_index.core.storage.kvstore import ( SimpleKVStore as 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-core/llama_index/core/ingestion/api_utils.py
llama-index-core/llama_index/core/ingestion/api_utils.py
import os import httpx from typing import Optional, TYPE_CHECKING from llama_index.core.constants import ( DEFAULT_APP_URL, DEFAULT_BASE_URL, ) if TYPE_CHECKING: from llama_cloud.client import AsyncLlamaCloud, LlamaCloud def get_client( api_key: Optional[str] = None, base_url: Optional[str] = No...
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-core/llama_index/core/tools/ondemand_loader_tool.py
llama-index-core/llama_index/core/tools/ondemand_loader_tool.py
""" Ad-hoc data loader tool. Tool that wraps any data loader, and is able to load data on-demand. """ from typing import Any, Callable, Dict, List, Optional, Tuple, Type from llama_index.core.bridge.pydantic import BaseModel from llama_index.core.indices.base import BaseIndex from llama_index.core.indices.vector_st...
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-core/llama_index/core/tools/retriever_tool.py
llama-index-core/llama_index/core/tools/retriever_tool.py
"""Retriever tool.""" from typing import TYPE_CHECKING, Any, List, Optional from llama_index.core.base.base_retriever import BaseRetriever if TYPE_CHECKING: from llama_index.core.langchain_helpers.agents.tools import LlamaIndexTool from llama_index.core.schema import ( MetadataMode, Node, NodeWithSc...
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-core/llama_index/core/tools/function_tool.py
llama-index-core/llama_index/core/tools/function_tool.py
import asyncio import inspect from typing import ( TYPE_CHECKING, Any, Awaitable, Callable, Dict, List, Optional, Type, Union, Tuple, get_origin, ) import re if TYPE_CHECKING: from llama_index.core.bridge.langchain import StructuredTool, Tool from llama_index.core.async...
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-core/llama_index/core/tools/eval_query_engine.py
llama-index-core/llama_index/core/tools/eval_query_engine.py
from typing import Any, Optional from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.evaluation import ( AnswerRelevancyEvaluator, BaseEvaluator, EvaluationResult, ) from llama_index.core.tools import QueryEngineTool from llama_index.core.tools.types import ToolMetadat...
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-core/llama_index/core/tools/query_plan.py
llama-index-core/llama_index/core/tools/query_plan.py
"""Query plan tool.""" from typing import Any, Dict, List, Optional from llama_index.core.bridge.pydantic import BaseModel, Field from llama_index.core.response_synthesizers import ( BaseSynthesizer, get_response_synthesizer, ) from llama_index.core.schema import NodeWithScore, TextNode from llama_index.core....
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-core/llama_index/core/tools/calling.py
llama-index-core/llama_index/core/tools/calling.py
from llama_index.core.tools.types import BaseTool, ToolOutput, adapt_to_async_tool from typing import TYPE_CHECKING, Sequence from llama_index.core.llms.llm import ToolSelection import json if TYPE_CHECKING: from llama_index.core.tools.types import BaseTool def call_tool(tool: BaseTool, arguments: dict) -> ToolO...
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-core/llama_index/core/tools/utils.py
llama-index-core/llama_index/core/tools/utils.py
from inspect import signature from typing import ( Any, Awaitable, Callable, List, Optional, Tuple, Type, Union, cast, get_origin, get_args, ) import datetime import typing from llama_index.core.bridge.pydantic import BaseModel, FieldInfo, create_model def create_schema_fr...
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-core/llama_index/core/tools/download.py
llama-index-core/llama_index/core/tools/download.py
"""Download tool from Llama Index. Deprecated.""" import json import os from typing import Optional, Type from deprecated import deprecated from llama_index.core.download.integration import download_integration from llama_index.core.tools.tool_spec.base import BaseToolSpec @deprecated( "`download_tool()` is de...
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-core/llama_index/core/tools/__init__.py
llama-index-core/llama_index/core/tools/__init__.py
"""Tools.""" from llama_index.core.tools.download import download_tool from llama_index.core.tools.function_tool import FunctionTool from llama_index.core.tools.query_engine import QueryEngineTool from llama_index.core.tools.query_plan import QueryPlanTool from llama_index.core.tools.retriever_tool import RetrieverToo...
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-core/llama_index/core/tools/types.py
llama-index-core/llama_index/core/tools/types.py
import asyncio import json import re from abc import abstractmethod from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type from llama_index.core.base.llms.types import ContentBlock, TextBlock from llama_index.core.instrumentation import DispatcherSpanMixin if TYPE_CHECKING...
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-core/llama_index/core/tools/query_engine.py
llama-index-core/llama_index/core/tools/query_engine.py
from typing import TYPE_CHECKING, Any, Optional from llama_index.core.base.base_query_engine import BaseQueryEngine if TYPE_CHECKING: from llama_index.core.langchain_helpers.agents.tools import ( LlamaIndexTool, ) from llama_index.core.tools.types import AsyncBaseTool, ToolMetadata, ToolOutput DEFAUL...
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-core/llama_index/core/tools/tool_spec/__init__.py
llama-index-core/llama_index/core/tools/tool_spec/__init__.py
"""init params."""
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-core/llama_index/core/tools/tool_spec/base.py
llama-index-core/llama_index/core/tools/tool_spec/base.py
"""Base tool spec class.""" import asyncio from inspect import signature from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Type, Union from llama_index.core.bridge.pydantic import BaseModel from llama_index.core.tools.function_tool import FunctionTool from llama_index.core.tools.types import 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-core/llama_index/core/tools/tool_spec/load_and_search/__init__.py
llama-index-core/llama_index/core/tools/tool_spec/load_and_search/__init__.py
from llama_index.core.tools.tool_spec.load_and_search.base import ( LoadAndSearchToolSpec, ) __all__ = ["LoadAndSearchToolSpec"]
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-core/llama_index/core/tools/tool_spec/load_and_search/base.py
llama-index-core/llama_index/core/tools/tool_spec/load_and_search/base.py
""" Ad-hoc data loader tool. Tool that wraps any data loader, and is able to load data on-demand. """ from typing import Any, Dict, List, Optional, Type from llama_index.core.bridge.pydantic import BaseModel from llama_index.core.indices.base import BaseIndex from llama_index.core.indices.vector_store import Vector...
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-core/llama_index/core/command_line/__init__.py
llama-index-core/llama_index/core/command_line/__init__.py
# Deprecated. CLI is now its own package llama-index-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-index-core/llama_index/core/command_line/upgrade.py
llama-index-core/llama_index/core/command_line/upgrade.py
import json import os import re from pathlib import Path from typing import Any, 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: bo...
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-core/llama_index/core/sparse_embeddings/mock_sparse_embedding.py
llama-index-core/llama_index/core/sparse_embeddings/mock_sparse_embedding.py
from typing import Dict, Optional from llama_index.core.base.embeddings.base_sparse import ( BaseSparseEmbedding, SparseEmbedding, ) from llama_index.core.bridge.pydantic import Field class MockSparseEmbedding(BaseSparseEmbedding): """A mock sparse embedding model for testing.""" default_embedding: ...
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-core/llama_index/core/sparse_embeddings/__init__.py
llama-index-core/llama_index/core/sparse_embeddings/__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-core/llama_index/core/base/base_query_engine.py
llama-index-core/llama_index/core/base/base_query_engine.py
"""Base query engine.""" import logging from abc import abstractmethod from typing import Any, Dict, List, Optional, Sequence from llama_index.core.base.response.schema import RESPONSE_TYPE from llama_index.core.callbacks.base import CallbackManager from llama_index.core.prompts.mixin import PromptDictType, PromptMix...
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-core/llama_index/core/base/base_multi_modal_retriever.py
llama-index-core/llama_index/core/base/base_multi_modal_retriever.py
"""base multi modal retriever.""" from abc import abstractmethod from typing import List from llama_index.core.base.base_retriever import BaseRetriever from llama_index.core.image_retriever import BaseImageRetriever from llama_index.core.indices.query.schema import QueryType from llama_index.core.schema import NodeWi...
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-core/llama_index/core/base/base_auto_retriever.py
llama-index-core/llama_index/core/base/base_auto_retriever.py
from abc import abstractmethod from typing import Any, List, Tuple from llama_index.core.base.base_retriever import BaseRetriever from llama_index.core.bridge.pydantic import BaseModel from llama_index.core.schema import NodeWithScore, QueryBundle class BaseAutoRetriever(BaseRetriever): """Base auto retriever.""...
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-core/llama_index/core/base/base_selector.py
llama-index-core/llama_index/core/base/base_selector.py
from abc import abstractmethod from typing import List, Sequence, Union from llama_index.core.bridge.pydantic import BaseModel from llama_index.core.instrumentation import DispatcherSpanMixin from llama_index.core.prompts.mixin import PromptMixin, PromptMixinType from llama_index.core.schema import QueryBundle, QueryT...
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-core/llama_index/core/base/__init__.py
llama-index-core/llama_index/core/base/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false