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/base/base_retriever.py | llama-index-core/llama_index/core/base/base_retriever.py | """Base retriever."""
from abc import abstractmethod
from typing import Any, Dict, List, Optional
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.callbacks.schema import CBEventType, EventPayload
from llama_index.cor... | python | 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/llms/generic_utils.py | llama-index-core/llama_index/core/base/llms/generic_utils.py | import os
import base64
from binascii import Error as BinasciiError
from pathlib import Path
from typing import Any, Awaitable, Callable, List, Optional, Sequence
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
... | python | 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/llms/__init__.py | llama-index-core/llama_index/core/base/llms/__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/llms/types.py | llama-index-core/llama_index/core/base/llms/types.py | from __future__ import annotations
import base64
from binascii import Error as BinasciiError
from enum import Enum
from io import IOBase
from pathlib import Path
from typing import (
Annotated,
Any,
AsyncGenerator,
Dict,
Generator,
List,
Literal,
Optional,
Union,
cast,
)
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/base/llms/base.py | llama-index-core/llama_index/core/base/llms/base.py | from abc import abstractmethod
from typing import (
Any,
List,
Sequence,
)
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
... | python | 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/embeddings/base_sparse.py | llama-index-core/llama_index/core/base/embeddings/base_sparse.py | """Base sparse embeddings file."""
import asyncio
import math
from abc import abstractmethod
from collections import defaultdict
from typing import Any, Callable, Coroutine, Dict, List, Optional
from llama_index.core.bridge.pydantic import (
BaseModel,
Field,
ConfigDict,
model_serializer,
)
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/base/embeddings/__init__.py | llama-index-core/llama_index/core/base/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/embeddings/base.py | llama-index-core/llama_index/core/base/embeddings/base.py | """Base embeddings file."""
import asyncio
import uuid
from abc import abstractmethod
from enum import Enum
from typing import Any, Callable, Coroutine, List, Optional, Sequence, Tuple, cast
from typing_extensions import Self
import numpy as np
from llama_index.core.bridge.pydantic import (
Field,
ConfigDict,... | python | 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/response/schema.py | llama-index-core/llama_index/core/base/response/schema.py | """Response schema."""
import asyncio
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Union
from llama_index.core.async_utils import asyncio_run
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.schema import NodeWithScore
from llama_index.core.types 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/base/response/__init__.py | llama-index-core/llama_index/core/base/response/__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/chat_engine/multi_modal_context.py | llama-index-core/llama_index/core/chat_engine/multi_modal_context.py | from typing import TYPE_CHECKING, Any, 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 import trace_method
from llama_index.core.chat_engine.types import (
Ag... | python | 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/chat_engine/utils.py | llama-index-core/llama_index/core/chat_engine/utils.py | from typing import Callable, Dict, List, Optional
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseGen,
ChatResponseAsyncGen,
MessageRole,
)
from llama_index.core.llms.llm import LLM
from llama_index.core.prompts import ChatPromptTemplate, PromptTemplate
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/chat_engine/simple.py | llama-index-core/llama_index/core/chat_engine/simple.py | import asyncio
from typing import Any, List, Optional, Type
from llama_index.core.base.llms.types import ChatMessage
from llama_index.core.callbacks import CallbackManager, trace_method
from llama_index.core.chat_engine.types import (
AgentChatResponse,
BaseChatEngine,
StreamingAgentChatResponse,
)
from ll... | python | 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/chat_engine/__init__.py | llama-index-core/llama_index/core/chat_engine/__init__.py | from llama_index.core.chat_engine.condense_plus_context import (
CondensePlusContextChatEngine,
)
from llama_index.core.chat_engine.condense_question import (
CondenseQuestionChatEngine,
)
from llama_index.core.chat_engine.context import ContextChatEngine
from llama_index.core.chat_engine.simple import SimpleCh... | python | 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/chat_engine/types.py | llama-index-core/llama_index/core/chat_engine/types.py | import asyncio
import logging
import time
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from enum import Enum
from functools import partial
from inspect import iscoroutinefunction
from queue import Queue, Empty
from threading import Event
from typing import AsyncGenerator, Callable, Gener... | python | 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/chat_engine/context.py | llama-index-core/llama_index/core/chat_engine/context.py | from typing import Any, List, Optional, Union
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
MessageRole,
)
from llama_index.core.base.response.schema import (
Stream... | python | 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/chat_engine/condense_question.py | llama-index-core/llama_index/core/chat_engine/condense_question.py | import asyncio
import logging
from typing import Any, List, Optional, Type
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.llms.types import ChatMessage, MessageRole
from llama_index.core.base.response.schema import (
RESPONSE_TYPE,
StreamingResponse,
AsyncStr... | python | 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/chat_engine/condense_plus_context.py | llama-index-core/llama_index/core/chat_engine/condense_plus_context.py | import logging
from typing import Any, List, Optional, Tuple, Union
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
MessageRole,
)
from llama_index.core.base.response.schema import (
AsyncStreamingResponse,
StreamingResponse,
... | python | 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/voice_agents/websocket.py | llama-index-core/llama_index/core/voice_agents/websocket.py | from abc import ABC, abstractmethod
from typing import Optional, Any, TYPE_CHECKING
if TYPE_CHECKING:
from websockets.asyncio.client import ClientConnection
class BaseVoiceAgentWebsocket(ABC):
"""
Abstract base class for a voice agent websocket.
Attributes:
uri (str): URL of the websocket.
... | python | 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/voice_agents/events.py | llama-index-core/llama_index/core/voice_agents/events.py | from llama_index.core.bridge.pydantic import BaseModel, Field
class BaseVoiceAgentEvent(BaseModel):
"""
Base class to represent events in Voice Agents conversations.
Attributes:
type_t (str): Event type (serialized as 'type')
"""
type_t: str = Field(serialization_alias="type")
| python | 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/voice_agents/interface.py | llama-index-core/llama_index/core/voice_agents/interface.py | from typing import Any
from abc import ABC, abstractmethod
class BaseVoiceAgentInterface(ABC):
"""
Abstract base class for a voice agent audio input/output interface.
"""
@abstractmethod
def __init__(self, *args: Any, **kwargs: Any) -> None:
"""Please implement this method by initializing... | python | 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/voice_agents/__init__.py | llama-index-core/llama_index/core/voice_agents/__init__.py | from .base import BaseVoiceAgent
from .events import BaseVoiceAgentEvent
from .interface import BaseVoiceAgentInterface
from .websocket import BaseVoiceAgentWebsocket
__all__ = [
"BaseVoiceAgentWebsocket",
"BaseVoiceAgentInterface",
"BaseVoiceAgent",
"BaseVoiceAgentEvent",
]
| python | 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/voice_agents/base.py | llama-index-core/llama_index/core/voice_agents/base.py | from typing import Optional, Any, Callable, List
from abc import ABC, abstractmethod
from .websocket import BaseVoiceAgentWebsocket
from .interface import BaseVoiceAgentInterface
from .events import BaseVoiceAgentEvent
from llama_index.core.llms import ChatMessage
from llama_index.core.tools import BaseTool
class Ba... | python | 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/multi_modal_llms/generic_utils.py | llama-index-core/llama_index/core/multi_modal_llms/generic_utils.py | import base64
import os
import filetype
import logging
from typing import List, Optional, Sequence
import requests
from llama_index.core.schema import ImageDocument
logger = logging.getLogger(__name__)
def load_image_urls(image_urls: List[str]) -> List[ImageDocument]:
"""
Convert a list of image URLs into... | python | 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/multi_modal_llms/__init__.py | llama-index-core/llama_index/core/multi_modal_llms/__init__.py | from llama_index.core.multi_modal_llms.base import (
MultiModalLLM,
MultiModalLLMMetadata,
)
__all__ = [
"MultiModalLLMMetadata",
"MultiModalLLM",
]
| python | 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/multi_modal_llms/base.py | llama-index-core/llama_index/core/multi_modal_llms/base.py | from abc import abstractmethod
from typing import Any, List, Optional, Sequence, Union
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
ImageBlock,
)
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/program/llm_prompt_program.py | llama-index-core/llama_index/core/program/llm_prompt_program.py | """LLM Prompt Program."""
from abc import abstractmethod
from typing import Any, Generic, Optional, Type, TypeVar
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.prompts.base import PromptTemplate
from llama_index.core.types import BasePydanticProgram, Model
LM = TypeVar("LM")
class Ba... | python | 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/program/function_program.py | llama-index-core/llama_index/core/program/function_program.py | """Pydantic program through function calling."""
import logging
from typing import (
Any,
Dict,
Optional,
Type,
cast,
Union,
List,
Generator,
AsyncGenerator,
)
from llama_index.core.bridge.pydantic import (
ValidationError,
)
from llama_index.core.base.llms.types import ChatRes... | python | 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/program/llm_program.py | llama-index-core/llama_index/core/program/llm_program.py | from typing import Any, Dict, Optional, Type, cast
from llama_index.core.llms.llm import LLM
from llama_index.core.output_parsers.pydantic import PydanticOutputParser
from llama_index.core.prompts.base import BasePromptTemplate, PromptTemplate
from llama_index.core.settings import Settings
from llama_index.core.types ... | python | 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/program/multi_modal_llm_program.py | llama-index-core/llama_index/core/program/multi_modal_llm_program.py | from typing import Any, Dict, List, Optional, Type, Union, cast
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.output_parsers.pydantic import PydanticOutputParser
from llama_index.core.prompts.base import BasePromptTemplate, PromptTemplate
from llama_index.core.llms import ImageBlock, Tex... | python | 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/program/utils.py | llama-index-core/llama_index/core/program/utils.py | """Program utils."""
import logging
from typing import Any, List, Type, Sequence, Union, Optional, Dict
from llama_index.core.bridge.pydantic import (
BaseModel,
ConfigDict,
Field,
ValidationError,
create_model,
)
from llama_index.core.llms.llm import LLM, ToolSelection
from llama_index.core.llms.... | python | 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/program/streaming_utils.py | llama-index-core/llama_index/core/program/streaming_utils.py | """
Simplified streaming utilities for processing structured outputs from message content.
This module provides utilities for processing streaming responses that contain
structured data directly in the message content (not in function calls).
"""
from typing import Optional, Type, Union
from pydantic import Validati... | python | 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/program/__init__.py | llama-index-core/llama_index/core/program/__init__.py | from llama_index.core.program.llm_program import LLMTextCompletionProgram
from llama_index.core.program.function_program import FunctionCallingProgram
from llama_index.core.program.multi_modal_llm_program import (
MultiModalLLMCompletionProgram,
)
from llama_index.core.types import BasePydanticProgram
__all__ = [
... | python | 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/indices/registry.py | llama-index-core/llama_index/core/indices/registry.py | """Index registry."""
from typing import Dict, Type
from llama_index.core.data_structs.struct_type import IndexStructType
from llama_index.core.indices.base import BaseIndex
from llama_index.core.indices.document_summary.base import DocumentSummaryIndex
from llama_index.core.indices.empty.base import EmptyIndex
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/indices/postprocessor.py | llama-index-core/llama_index/core/indices/postprocessor.py | # for backward compatibility
from llama_index.core.postprocessor import (
AutoPrevNextNodePostprocessor,
EmbeddingRecencyPostprocessor,
FixedRecencyPostprocessor,
KeywordNodePostprocessor,
LLMRerank,
LongContextReorder,
MetadataReplacementPostProcessor,
NERPIINodePostprocessor,
PIINo... | python | 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/indices/prompt_helper.py | llama-index-core/llama_index/core/indices/prompt_helper.py | """
General prompt helper that can help deal with LLM context window token limitations.
At its core, it calculates available context size by starting with the context window
size of an LLM and reserve token space for the prompt template, and the output.
It provides utility for "repacking" text chunks (retrieved 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/indices/utils.py | llama-index-core/llama_index/core/indices/utils.py | """Utilities for GPT indices."""
import logging
import re
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.embeddings.multi_modal_base import MultiModalEmbedding
from llama_index.core.schema import BaseNode, ImageNode, MetadataMode
from llama_index.core.utils import globals_helper,... | python | 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/indices/loading.py | llama-index-core/llama_index/core/indices/loading.py | import logging
from typing import Any, List, Optional, Sequence
from llama_index.core.indices.base import BaseIndex
from llama_index.core.indices.composability.graph import ComposableGraph
from llama_index.core.indices.registry import INDEX_STRUCT_TYPE_TO_INDEX_CLASS
from llama_index.core.storage.storage_context 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/indices/__init__.py | llama-index-core/llama_index/core/indices/__init__.py | """LlamaIndex data structures."""
# indices
from llama_index.core.indices.composability.graph import ComposableGraph
from llama_index.core.indices.document_summary import (
DocumentSummaryIndex,
GPTDocumentSummaryIndex,
)
from llama_index.core.indices.document_summary.base import DocumentSummaryIndex
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-core/llama_index/core/indices/base.py | llama-index-core/llama_index/core/indices/base.py | """Base index classes."""
import logging
from abc import ABC, abstractmethod
from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.callbacks... | python | 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/indices/base_retriever.py | llama-index-core/llama_index/core/indices/base_retriever.py | # for backwards compatibility
from llama_index.core.base.base_retriever import BaseRetriever
__all__ = [
"BaseRetriever",
]
| python | 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/indices/empty/retrievers.py | llama-index-core/llama_index/core/indices/empty/retrievers.py | """Default query for EmptyIndex."""
from typing import Any, List, Optional
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.indices.empty.base import EmptyIndex
from llama_index.core.prompts import BasePromptTemplate
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/indices/empty/__init__.py | llama-index-core/llama_index/core/indices/empty/__init__.py | """Empty Index."""
from llama_index.core.indices.empty.base import EmptyIndex, GPTEmptyIndex
from llama_index.core.indices.empty.retrievers import EmptyIndexRetriever
__all__ = ["EmptyIndex", "EmptyIndexRetriever", "GPTEmptyIndex"]
| python | 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/indices/empty/base.py | llama-index-core/llama_index/core/indices/empty/base.py | """
Empty index.
An index that doesn't contain any documents. Can only be used for
pure LLM calls.
"""
from typing import Any, Dict, 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.data_struct... | python | 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/indices/struct_store/container_builder.py | llama-index-core/llama_index/core/indices/struct_store/container_builder.py | """SQL Container builder."""
from typing import Any, Dict, List, Optional, Type
from llama_index.core.indices.base import BaseIndex
from llama_index.core.indices.common.struct_store.base import (
SQLDocumentContextBuilder,
)
from llama_index.core.indices.common.struct_store.schema import SQLContextContainer
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/indices/struct_store/sql.py | llama-index-core/llama_index/core/indices/struct_store/sql.py | """SQL Structured Store."""
from collections import defaultdict
from enum import Enum
from typing import Any, Optional, Sequence, Union
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.data_structs.table import SQL... | python | 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/indices/struct_store/sql_retriever.py | llama-index-core/llama_index/core/indices/struct_store/sql_retriever.py | """SQL Retriever."""
import logging
from abc import ABC, abstractmethod
from enum import Enum
from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.base.embeddings.base import BaseEmbedding
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/indices/struct_store/__init__.py | llama-index-core/llama_index/core/indices/struct_store/__init__.py | """Structured store indices."""
from llama_index.core.indices.struct_store.json_query import JSONQueryEngine
from llama_index.core.indices.struct_store.pandas import (
GPTPandasIndex,
PandasIndex,
)
from llama_index.core.indices.struct_store.sql import (
GPTSQLStructStoreIndex,
SQLContextContainerBuild... | python | 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/indices/struct_store/json_query.py | llama-index-core/llama_index/core/indices/struct_store/json_query.py | import json
import logging
import re
from typing import Any, Callable, Dict, List, Optional, Union
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.response.schema import Response
from llama_index.core.llms.llm import LLM
from llama_index.core.prompts import BasePromptTemp... | python | 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/indices/struct_store/sql_query.py | llama-index-core/llama_index/core/indices/struct_store/sql_query.py | """Default query for SQLStructStoreIndex."""
import logging
from abc import abstractmethod
from typing import Any, Dict, List, Optional, Tuple, Union, cast
from llama_index.core.indices.base import BaseRetriever
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.response.sch... | python | 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/indices/struct_store/base.py | llama-index-core/llama_index/core/indices/struct_store/base.py | """Struct store."""
import re
from typing import Any, Callable, Dict, Generic, Optional, Sequence, TypeVar
from llama_index.core.data_structs.table import BaseStructTable
from llama_index.core.indices.base import BaseIndex
from llama_index.core.prompts import BasePromptTemplate
from llama_index.core.prompts.default_p... | python | 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/indices/struct_store/pandas.py | llama-index-core/llama_index/core/indices/struct_store/pandas.py | """
Pandas csv structured store.
DEPRECATED: Please use :class:`PandasQueryEngine` in `llama-index-experimental` instead.
"""
from typing import Any
class PandasIndex:
def __init__(
self,
*args: Any,
**kwargs: Any,
) -> None:
raise DeprecationWarning(
"PandasQuery... | python | 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/indices/managed/__init__.py | llama-index-core/llama_index/core/indices/managed/__init__.py | from llama_index.core.indices.managed.base import BaseManagedIndex
__all__ = [
"BaseManagedIndex",
]
| python | 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/indices/managed/types.py | llama-index-core/llama_index/core/indices/managed/types.py | """Managed index types."""
from enum import Enum
class ManagedIndexQueryMode(str, Enum):
"""Managed Index query mode."""
DEFAULT = "default"
MMR = "mmr"
| python | 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/indices/managed/base.py | llama-index-core/llama_index/core/indices/managed/base.py | """
Base Managed Service index.
An index that is built on top of a managed service.
"""
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional, Sequence, Type
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.callbacks.base import CallbackManager
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/indices/query/schema.py | llama-index-core/llama_index/core/indices/query/schema.py | # for backwards compatibility
from llama_index.core.schema import QueryBundle, QueryType
__all__ = ["QueryBundle", "QueryType"]
| python | 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/indices/query/__init__.py | llama-index-core/llama_index/core/indices/query/__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/indices/query/embedding_utils.py | llama-index-core/llama_index/core/indices/query/embedding_utils.py | """Embedding utils for queries."""
import heapq
import math
from typing import Any, Callable, List, Optional, Tuple
import numpy as np
from llama_index.core.base.embeddings.base import similarity as default_similarity_fn
from llama_index.core.vector_stores.types import VectorStoreQueryMode
def get_top_k_embeddings(... | python | 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/indices/query/base.py | llama-index-core/llama_index/core/indices/query/base.py | # for backwards compatibility
from llama_index.core.base.base_query_engine import BaseQueryEngine
__all__ = [
"BaseQueryEngine",
]
| python | 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/indices/query/query_transform/prompts.py | llama-index-core/llama_index/core/indices/query/query_transform/prompts.py | """Query transform prompts."""
from llama_index.core.prompts.base import PromptTemplate
from llama_index.core.prompts.prompt_type import PromptType
# deprecated, kept for backwards compatibility
"""Decompose prompt for query transformation.
PromptTemplate to "decompose" a query into another query
given the existing ... | python | 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/indices/query/query_transform/__init__.py | llama-index-core/llama_index/core/indices/query/query_transform/__init__.py | """Query Transforms."""
from llama_index.core.indices.query.query_transform.base import (
DecomposeQueryTransform,
HyDEQueryTransform,
StepDecomposeQueryTransform,
)
__all__ = [
"HyDEQueryTransform",
"DecomposeQueryTransform",
"StepDecomposeQueryTransform",
]
| python | 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/indices/query/query_transform/base.py | llama-index-core/llama_index/core/indices/query/query_transform/base.py | """Query transform."""
import dataclasses
from abc import abstractmethod
from typing import Dict, Optional, cast
from llama_index.core.base.response.schema import Response
from llama_index.core.indices.query.query_transform.prompts import (
DEFAULT_DECOMPOSE_QUERY_TRANSFORM_PROMPT,
DEFAULT_IMAGE_OUTPUT_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/indices/query/query_transform/feedback_transform.py | llama-index-core/llama_index/core/indices/query/query_transform/feedback_transform.py | import logging
from typing import Dict, Optional
from llama_index.core.evaluation.base import Evaluation
from llama_index.core.indices.query.query_transform.base import BaseQueryTransform
from llama_index.core.llms import LLM
from llama_index.core.prompts.base import BasePromptTemplate, PromptTemplate
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/indices/document_summary/retrievers.py | llama-index-core/llama_index/core/indices/document_summary/retrievers.py | """
Document summary retrievers.
This module contains retrievers for document summary indices.
"""
import logging
from typing import Any, Callable, List, Optional
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.call... | python | 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/indices/document_summary/__init__.py | llama-index-core/llama_index/core/indices/document_summary/__init__.py | """Document summary index."""
from llama_index.core.indices.document_summary.base import (
DocumentSummaryIndex,
GPTDocumentSummaryIndex,
)
from llama_index.core.indices.document_summary.retrievers import (
DocumentSummaryIndexEmbeddingRetriever,
DocumentSummaryIndexLLMRetriever,
DocumentSummaryInd... | python | 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/indices/document_summary/base.py | llama-index-core/llama_index/core/indices/document_summary/base.py | """
Document summary index.
A data structure where LlamaIndex stores the summary per document, and maps
the summary to the underlying Nodes.
This summary can be used for retrieval.
"""
import logging
from collections import defaultdict
from enum import Enum
from typing import Any, Dict, List, Optional, Sequence, Uni... | python | 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/indices/list/retrievers.py | llama-index-core/llama_index/core/indices/list/retrievers.py | """Retrievers for SummaryIndex."""
import logging
from typing import Any, Callable, List, Optional, Tuple
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.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/indices/list/__init__.py | llama-index-core/llama_index/core/indices/list/__init__.py | """List-based data structures."""
from llama_index.core.indices.list.base import (
GPTListIndex,
ListIndex,
SummaryIndex,
)
from llama_index.core.indices.list.retrievers import (
ListIndexEmbeddingRetriever,
ListIndexLLMRetriever,
ListIndexRetriever,
SummaryIndexEmbeddingRetriever,
Summ... | python | 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/indices/list/base.py | llama-index-core/llama_index/core/indices/list/base.py | """
Summary index.
A simple data structure where LlamaIndex iterates through document chunks
in sequence in order to answer a given query.
"""
from enum import Enum
from typing import Any, Dict, Optional, Sequence, Union
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.base.embed... | python | 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/indices/property_graph/utils.py | llama-index-core/llama_index/core/indices/property_graph/utils.py | from typing import List, Tuple
def default_parse_triplets_fn(
response: str, max_length: int = 128
) -> List[Tuple[str, str, str]]:
knowledge_strs = response.strip().split("\n")
results = []
for text in knowledge_strs:
if "(" not in text or ")" not in text or text.index(")") < text.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/indices/property_graph/__init__.py | llama-index-core/llama_index/core/indices/property_graph/__init__.py | from llama_index.core.indices.property_graph.base import PropertyGraphIndex
from llama_index.core.indices.property_graph.retriever import PGRetriever
from llama_index.core.indices.property_graph.sub_retrievers.base import BasePGRetriever
from llama_index.core.indices.property_graph.sub_retrievers.custom import (
Cu... | python | 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/indices/property_graph/retriever.py | llama-index-core/llama_index/core/indices/property_graph/retriever.py | from tqdm import tqdm
from typing import Any, List
from llama_index.core.async_utils import asyncio_run, run_jobs
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.indices.property_graph.sub_retrievers.base import (
BasePGRetriever,
)
from llama_index.core.schema import NodeWithS... | python | 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/indices/property_graph/base.py | llama-index-core/llama_index/core/indices/property_graph/base.py | import asyncio
from typing import Any, Dict, List, Optional, Sequence, Type, TYPE_CHECKING
from llama_index.core.data_structs import IndexLPG
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.llms import LLM
from llama_index.core.embeddings.utils import EmbedType, resolve_embed_model... | python | 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/indices/property_graph/sub_retrievers/vector.py | llama-index-core/llama_index/core/indices/property_graph/sub_retrievers/vector.py | import dataclasses
from typing import Any, List, Sequence, Optional, Dict, Set
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.indices.property_graph.sub_retrievers.base import (
BasePGRetriever,
)
from llama_index.core.graph_stores.types import (
PropertyGraphStore,
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/indices/property_graph/sub_retrievers/cypher_template.py | llama-index-core/llama_index/core/indices/property_graph/sub_retrievers/cypher_template.py | from typing import Any, List, Optional, Type
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.graph_stores.types import PropertyGraphStore
from llama_index.core.indices.property_graph.sub_retrievers.base import BasePGRetriever
from llama_index.core.llms import LLM
from llama_index.core.prom... | python | 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/indices/property_graph/sub_retrievers/llm_synonym.py | llama-index-core/llama_index/core/indices/property_graph/sub_retrievers/llm_synonym.py | from typing import Any, Callable, List, Optional, Union
from llama_index.core.llms.llm import LLM
from llama_index.core.indices.property_graph.sub_retrievers.base import (
BasePGRetriever,
)
from llama_index.core.graph_stores.types import (
PropertyGraphStore,
KG_SOURCE_REL,
)
from llama_index.core.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/indices/property_graph/sub_retrievers/text_to_cypher.py | llama-index-core/llama_index/core/indices/property_graph/sub_retrievers/text_to_cypher.py | from typing import Any, Callable, List, Optional, Union
from llama_index.core.graph_stores.types import PropertyGraphStore
from llama_index.core.indices.property_graph.sub_retrievers.base import BasePGRetriever
from llama_index.core.llms import LLM
from llama_index.core.prompts import PromptTemplate
from llama_index.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/indices/property_graph/sub_retrievers/__init__.py | llama-index-core/llama_index/core/indices/property_graph/sub_retrievers/__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/indices/property_graph/sub_retrievers/base.py | llama-index-core/llama_index/core/indices/property_graph/sub_retrievers/base.py | from abc import abstractmethod
from typing import Any, Dict, List, Optional
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.graph_stores.types import PropertyGraphStore, Triplet
from llama_index.core.indices.property_graph.base import (
TRIPLET_SOURCE_KEY,
)
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/indices/property_graph/sub_retrievers/custom.py | llama-index-core/llama_index/core/indices/property_graph/sub_retrievers/custom.py | from abc import abstractmethod
from typing import Any, List, Union
from llama_index.core.graph_stores.types import PropertyGraphStore
from llama_index.core.indices.property_graph.sub_retrievers.base import BasePGRetriever
from llama_index.core.schema import NodeWithScore, QueryBundle, TextNode
CUSTOM_RETRIEVE_TYPE = ... | python | 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/indices/property_graph/transformations/simple_llm.py | llama-index-core/llama_index/core/indices/property_graph/transformations/simple_llm.py | import asyncio
from typing import Any, Callable, Optional, Sequence, Union
from llama_index.core.async_utils import run_jobs
from llama_index.core.indices.property_graph.utils import (
default_parse_triplets_fn,
)
from llama_index.core.graph_stores.types import (
EntityNode,
Relation,
KG_NODES_KEY,
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-core/llama_index/core/indices/property_graph/transformations/implicit.py | llama-index-core/llama_index/core/indices/property_graph/transformations/implicit.py | from tqdm import tqdm
from typing import Any, Sequence
from llama_index.core.schema import TransformComponent, BaseNode, NodeRelationship
from llama_index.core.graph_stores.types import Relation, KG_NODES_KEY, KG_RELATIONS_KEY
def get_node_rel_string(relationship: NodeRelationship) -> str:
return str(relationshi... | python | 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/indices/property_graph/transformations/dynamic_llm.py | llama-index-core/llama_index/core/indices/property_graph/transformations/dynamic_llm.py | import asyncio
from typing import Any, Callable, Dict, List, Optional, Sequence, Union, Tuple
import re
import json
from llama_index.core.async_utils import run_jobs
from llama_index.core.prompts import PromptTemplate
from llama_index.core.llms.llm import LLM
from llama_index.core.graph_stores.types import (
Entity... | python | 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/indices/property_graph/transformations/utils.py | llama-index-core/llama_index/core/indices/property_graph/transformations/utils.py | from typing import Any, Dict, List, Optional
try:
from typing import TypeAlias # type: ignore
except ImportError:
# python 3.8 and 3.9 compatibility
from typing import Any as TypeAlias # type: ignore
from llama_index.core.bridge.pydantic import create_model, Field
def get_entity_class(
possible_en... | python | 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/indices/property_graph/transformations/__init__.py | llama-index-core/llama_index/core/indices/property_graph/transformations/__init__.py | from llama_index.core.indices.property_graph.transformations.implicit import (
ImplicitPathExtractor,
)
from llama_index.core.indices.property_graph.transformations.schema_llm import (
SchemaLLMPathExtractor,
)
from llama_index.core.indices.property_graph.transformations.simple_llm import (
SimpleLLMPathExt... | python | 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/indices/property_graph/transformations/schema_llm.py | llama-index-core/llama_index/core/indices/property_graph/transformations/schema_llm.py | import asyncio
from typing import Any, Dict, List, Literal, Optional, Sequence, Tuple, Type, Union
from llama_index.core.async_utils import run_jobs
from llama_index.core.bridge.pydantic import create_model, field_validator
from llama_index.core.graph_stores.types import (
EntityNode,
Relation,
Triplet,
... | python | 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/indices/multi_modal/__init__.py | llama-index-core/llama_index/core/indices/multi_modal/__init__.py | """Vector-store based data structures."""
from llama_index.core.indices.multi_modal.base import MultiModalVectorStoreIndex
from llama_index.core.indices.multi_modal.retriever import (
MultiModalVectorIndexRetriever,
)
__all__ = [
"MultiModalVectorStoreIndex",
"MultiModalVectorIndexRetriever",
]
| python | 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/indices/multi_modal/retriever.py | llama-index-core/llama_index/core/indices/multi_modal/retriever.py | """Base vector store index query."""
import asyncio
from typing import TYPE_CHECKING, Any, Dict, List, Optional
from llama_index.core.base.base_multi_modal_retriever import (
MultiModalRetriever,
)
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.callbacks.base import Callback... | python | 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/indices/multi_modal/base.py | llama-index-core/llama_index/core/indices/multi_modal/base.py | """
Multi Modal Vector Store Index.
An index that is built on top of multiple vector stores for different modalities.
"""
import logging
from typing import Any, List, Optional, Sequence, cast
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.base.llms.base import BaseLLM
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/indices/common/__init__.py | llama-index-core/llama_index/core/indices/common/__init__.py | """Init 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-core/llama_index/core/indices/common/struct_store/sql.py | llama-index-core/llama_index/core/indices/common/struct_store/sql.py | """SQL StructDatapointExtractor."""
from typing import Any, Dict, Optional, cast
from llama_index.core.data_structs.table import StructDatapoint
from llama_index.core.indices.common.struct_store.base import (
OUTPUT_PARSER_TYPE,
BaseStructDatapointExtractor,
)
from llama_index.core.llms import LLM
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/indices/common/struct_store/schema.py | llama-index-core/llama_index/core/indices/common/struct_store/schema.py | """Common structures for structured indices."""
from dataclasses import dataclass
from typing import Dict, Optional
from dataclasses_json import DataClassJsonMixin
# TODO: migrate this to be a data_struct
@dataclass
class SQLContextContainer(DataClassJsonMixin):
"""
SQLContextContainer.
A container 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/indices/common/struct_store/__init__.py | llama-index-core/llama_index/core/indices/common/struct_store/__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/indices/common/struct_store/base.py | llama-index-core/llama_index/core/indices/common/struct_store/base.py | """Common classes for structured operations."""
import logging
from abc import abstractmethod
from typing import Any, Callable, Dict, List, Optional, Sequence, cast
from llama_index.core.callbacks.schema import CBEventType, EventPayload
from llama_index.core.data_structs.table import StructDatapoint
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/indices/vector_store/__init__.py | llama-index-core/llama_index/core/indices/vector_store/__init__.py | """Vector-store based data structures."""
from llama_index.core.indices.vector_store.base import (
GPTVectorStoreIndex,
VectorStoreIndex,
)
from llama_index.core.indices.vector_store.retrievers import (
VectorIndexAutoRetriever,
VectorIndexRetriever,
)
__all__ = [
"VectorStoreIndex",
"VectorIn... | python | 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/indices/vector_store/base.py | llama-index-core/llama_index/core/indices/vector_store/base.py | """
Base vector store index.
An index that is built on top of an existing vector store.
"""
import asyncio
import logging
from typing import Any, Dict, List, Optional, Sequence
from llama_index.core.async_utils import run_async_tasks
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.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/indices/vector_store/retrievers/__init__.py | llama-index-core/llama_index/core/indices/vector_store/retrievers/__init__.py | from llama_index.core.indices.vector_store.retrievers.retriever import (
VectorIndexRetriever,
)
from llama_index.core.indices.vector_store.retrievers.auto_retriever import (
VectorIndexAutoRetriever,
)
__all__ = [
"VectorIndexRetriever",
"VectorIndexAutoRetriever",
]
| python | 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/indices/vector_store/retrievers/retriever.py | llama-index-core/llama_index/core/indices/vector_store/retrievers/retriever.py | """Base vector store index query."""
from collections.abc import Sequence
from typing import Any, Dict, List, Optional
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.callbacks.base import CallbackManager
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/indices/vector_store/retrievers/auto_retriever/prompts.py | llama-index-core/llama_index/core/indices/vector_store/retrievers/auto_retriever/prompts.py | """Autoretriever prompts."""
from llama_index.core.prompts.base import PromptTemplate
from llama_index.core.prompts.prompt_type import PromptType
from llama_index.core.vector_stores.types import (
FilterOperator,
MetadataFilter,
MetadataInfo,
VectorStoreInfo,
VectorStoreQuerySpec,
)
# NOTE: these ... | python | 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/indices/vector_store/retrievers/auto_retriever/auto_retriever.py | llama-index-core/llama_index/core/indices/vector_store/retrievers/auto_retriever/auto_retriever.py | import logging
from typing import Any, List, Optional, Tuple, cast
from llama_index.core.base.base_auto_retriever import BaseAutoRetriever
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.callbacks.base import CallbackManager
fr... | 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.