repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/tests/test_embeddings_sagemaker_endpoint.py
llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/tests/test_embeddings_sagemaker_endpoint.py
from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.embeddings.sagemaker_endpoint import SageMakerEmbedding def test_text_inference_embedding_class(): names_of_base_classes = [b.__name__ for b in SageMakerEmbedding.__mro__] assert BaseEmbedding.__name__ in names_of_base_classes
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/utils.py
llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/utils.py
import abc import json from typing import TYPE_CHECKING, List if TYPE_CHECKING: from botocore.response import StreamingBody from llama_index.core.bridge.pydantic import Field class BaseIOHandler(metaclass=abc.ABCMeta): content_type: str = Field( description="The MIME type of the input data in the re...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/__init__.py
from llama_index.embeddings.sagemaker_endpoint.base import SageMakerEmbedding __all__ = ["SageMakerEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/base.py
llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/base.py
from typing import Any, Dict, List, Optional from llama_index.core.base.embeddings.base import BaseEmbedding, Embedding from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.callbacks.base import CallbackManager from llama_index.core.constants import DEFAULT_EMBED_BATCH_SIZE 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-integrations/embeddings/llama-index-embeddings-oci-data-science/tests/test_embeddings_oci_data_science.py
llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/tests/test_embeddings_oci_data_science.py
from unittest.mock import AsyncMock, Mock import pytest from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.core.callbacks.base import CallbackManager from llama_index.embeddings.oci_data_science import OCIDataScienceEmbedding from llama_index.embeddings.oci_data_science.client import Asyn...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/tests/conftest.py
llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/tests/conftest.py
# pants requires this import to recognize the dep import pytest_asyncio # noqa: F401
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/tests/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/tests/test_oci_data_science_client.py
llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/tests/test_oci_data_science_client.py
from unittest.mock import AsyncMock, MagicMock, Mock, patch import httpx import pytest from llama_index.embeddings.oci_data_science.client import ( AsyncClient, BaseClient, Client, ExtendedRequestException, OCIAuth, _create_retry_decorator, _retry_decorator, _should_retry_exception, ) ...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/llama_index/embeddings/oci_data_science/client.py
llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/llama_index/embeddings/oci_data_science/client.py
import asyncio import functools import logging from abc import ABC from types import TracebackType from typing import ( Any, AnyStr, Callable, Dict, Iterator, Mapping, Optional, Sequence, Tuple, TypeVar, Union, ) import httpx import oci import requests from tenacity 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-integrations/embeddings/llama-index-embeddings-oci-data-science/llama_index/embeddings/oci_data_science/utils.py
llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/llama_index/embeddings/oci_data_science/utils.py
import logging from functools import wraps from typing import Any, Callable from packaging import version MIN_ADS_VERSION = "2.12.9" logger = logging.getLogger(__name__) class UnsupportedOracleAdsVersionError(Exception): """ Custom exception for unsupported `oracle-ads` versions. Attributes: 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-integrations/embeddings/llama-index-embeddings-oci-data-science/llama_index/embeddings/oci_data_science/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/llama_index/embeddings/oci_data_science/__init__.py
from llama_index.embeddings.oci_data_science.base import OCIDataScienceEmbedding __all__ = ["OCIDataScienceEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/llama_index/embeddings/oci_data_science/base.py
llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/llama_index/embeddings/oci_data_science/base.py
from typing import Any, Dict, List, Optional, Union from llama_index.core.base.embeddings.base import ( DEFAULT_EMBED_BATCH_SIZE, BaseEmbedding, ) from llama_index.core.bridge.pydantic import Field, PrivateAttr, model_validator from llama_index.core.callbacks.base import CallbackManager from llama_index.embedd...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-modelscope/tests/test_modelscope.py
llama-index-integrations/embeddings/llama-index-embeddings-modelscope/tests/test_modelscope.py
import pytest from llama_index.embeddings.modelscope.base import ModelScopeEmbedding @pytest.fixture() def modelscope_embedding(): return ModelScopeEmbedding() @pytest.fixture() def query(): return "吃完海鲜可以喝牛奶吗?" @pytest.fixture() def text(): return [ "不可以,早晨喝牛奶不科学", "吃了海鲜后是不能再喝牛奶的,因为牛奶...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-modelscope/tests/conftest.py
llama-index-integrations/embeddings/llama-index-embeddings-modelscope/tests/conftest.py
# pants requires this import to recognize the dep import pytest_asyncio # noqa: F401
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-modelscope/tests/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-modelscope/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-modelscope/llama_index/embeddings/modelscope/utils.py
llama-index-integrations/embeddings/llama-index-embeddings-modelscope/llama_index/embeddings/modelscope/utils.py
from typing import Dict, List from llama_index.core.base.embeddings.base import Embedding def sentence_to_input(sentence: str) -> Dict: return { "source_sentence": [sentence], } def sentences_to_input(sentences: List[str]) -> Dict: return { "source_sentence": sentences, } def outpu...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-modelscope/llama_index/embeddings/modelscope/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-modelscope/llama_index/embeddings/modelscope/__init__.py
from llama_index.embeddings.modelscope.base import ModelScopeEmbedding __all__ = ["ModelScopeEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-modelscope/llama_index/embeddings/modelscope/base.py
llama-index-integrations/embeddings/llama-index-embeddings-modelscope/llama_index/embeddings/modelscope/base.py
import logging from typing import Any, Optional, List from llama_index.core.base.embeddings.base import ( BaseEmbedding, Embedding, ) from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.types import PydanticProgramMode from llama_index.embeddings.modelscope.utils import ( s...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-elasticsearch/tests/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-elasticsearch/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-elasticsearch/tests/test_embeddings_elasticsearch.py
llama-index-integrations/embeddings/llama-index-embeddings-elasticsearch/tests/test_embeddings_elasticsearch.py
import pytest from llama_index.embeddings.elasticsearch import ElasticsearchEmbedding try: import elasticsearch except ImportError: elasticsearch = None # type: ignore @pytest.fixture() def model_id() -> str: # Replace with your actual model_id return "your_model_id" @pytest.fixture() def es_url()...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-elasticsearch/llama_index/embeddings/elasticsearch/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-elasticsearch/llama_index/embeddings/elasticsearch/__init__.py
from llama_index.embeddings.elasticsearch.base import ElasticsearchEmbedding __all__ = ["ElasticsearchEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-elasticsearch/llama_index/embeddings/elasticsearch/base.py
llama-index-integrations/embeddings/llama-index-embeddings-elasticsearch/llama_index/embeddings/elasticsearch/base.py
import asyncio from typing import Any, List from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.core.bridge.pydantic import PrivateAttr from elasticsearch import Elasticsearch from elasticsearch.client import MlClient class ElasticsearchEmbedding(BaseEmbedding): """ Elasticsearc...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-ipex-llm/examples/basic.py
llama-index-integrations/embeddings/llama-index-embeddings-ipex-llm/examples/basic.py
import argparse from llama_index.embeddings.ipex_llm import IpexLLMEmbedding if __name__ == "__main__": parser = argparse.ArgumentParser(description="IpexLLMEmbedding Basic Usage Example") parser.add_argument( "--model-name", "-m", type=str, default="BAAI/bge-large-en-v1.5", ...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-ipex-llm/llama_index/embeddings/ipex_llm/utils.py
llama-index-integrations/embeddings/llama-index-embeddings-ipex-llm/llama_index/embeddings/ipex_llm/utils.py
# This file is adapted from # https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/embeddings/llama-index-embeddings-huggingface/llama_index/embeddings/huggingface/utils.py from typing import Optional, List from pathlib import Path DEFAULT_HUGGINGFACE_EMBEDDING_MODEL = "BAAI/bge-small-en-v1.5" ...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-ipex-llm/llama_index/embeddings/ipex_llm/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-ipex-llm/llama_index/embeddings/ipex_llm/__init__.py
from llama_index.embeddings.ipex_llm.base import IpexLLMEmbedding __all__ = ["IpexLLMEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-ipex-llm/llama_index/embeddings/ipex_llm/base.py
llama-index-integrations/embeddings/llama-index-embeddings-ipex-llm/llama_index/embeddings/ipex_llm/base.py
# This file is adapted from # https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/embeddings/llama-index-embeddings-huggingface/llama_index/embeddings/huggingface/base.py import logging from typing import Any, List, Optional from ipex_llm.transformers.convert import _optimize_pre, _optimize_pos...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/tests/test_embeddings_huggingface_optimum_intel.py
llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/tests/test_embeddings_huggingface_optimum_intel.py
from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.embeddings.huggingface_optimum_intel import IntelEmbedding def test_optimum_intel_embedding_class(): names_of_base_classes = [b.__name__ for b in IntelEmbedding.__mro__] assert BaseEmbedding.__name__ in names_of_base_classes
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/tests/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/llama_index/embeddings/huggingface_optimum_intel/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/llama_index/embeddings/huggingface_optimum_intel/__init__.py
from llama_index.embeddings.huggingface_optimum_intel.base import IntelEmbedding __all__ = ["IntelEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/llama_index/embeddings/huggingface_optimum_intel/base.py
llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum-intel/llama_index/embeddings/huggingface_optimum_intel/base.py
from typing import Any, List, Optional from llama_index.core.base.embeddings.base import ( DEFAULT_EMBED_BATCH_SIZE, BaseEmbedding, ) from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.callbacks import CallbackManager from llama_index.core.utils import infer_torch_device from...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-alibabacloud-aisearch/tests/test_embeddings_alibabacloud_aisearch.py
llama-index-integrations/embeddings/llama-index-embeddings-alibabacloud-aisearch/tests/test_embeddings_alibabacloud_aisearch.py
from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.embeddings.alibabacloud_aisearch import AlibabaCloudAISearchEmbedding def test_class(): names_of_base_classes = [b.__name__ for b in AlibabaCloudAISearchEmbedding.__mro__] assert BaseEmbedding.__name__ in names_of_base_classes
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-alibabacloud-aisearch/tests/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-alibabacloud-aisearch/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-alibabacloud-aisearch/llama_index/embeddings/alibabacloud_aisearch/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-alibabacloud-aisearch/llama_index/embeddings/alibabacloud_aisearch/__init__.py
from llama_index.embeddings.alibabacloud_aisearch.base import ( AlibabaCloudAISearchEmbedding, ) __all__ = ["AlibabaCloudAISearchEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-alibabacloud-aisearch/llama_index/embeddings/alibabacloud_aisearch/base.py
llama-index-integrations/embeddings/llama-index-embeddings-alibabacloud-aisearch/llama_index/embeddings/alibabacloud_aisearch/base.py
import asyncio import time from typing import Any, List from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.base.llms.generic_utils import get_from_param_...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-ollama/tests/test_embeddings_ollama.py
llama-index-integrations/embeddings/llama-index-embeddings-ollama/tests/test_embeddings_ollama.py
import os import pytest from unittest.mock import patch from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.embeddings.ollama import OllamaEmbedding from ollama import Client # This section of code checks and actual integration with a local ollama server (if it exists) # And the actual ...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-ollama/tests/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-ollama/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-ollama/llama_index/embeddings/ollama/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-ollama/llama_index/embeddings/ollama/__init__.py
from llama_index.embeddings.ollama.base import OllamaEmbedding __all__ = ["OllamaEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-ollama/llama_index/embeddings/ollama/base.py
llama-index-integrations/embeddings/llama-index-embeddings-ollama/llama_index/embeddings/ollama/base.py
import asyncio from typing import Any, Dict, List, Optional, Union from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.callbacks.base import CallbackManager from llama_index.core.constants import DEFAULT_EMBED_BATCH_SIZE ...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-vllm/tests/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-vllm/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-vllm/tests/test_embeddings_vllm.py
llama-index-integrations/embeddings/llama-index-embeddings-vllm/tests/test_embeddings_vllm.py
import pytest from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.embeddings.vllm import VllmEmbedding def test_vllmembedding_class(): names_of_base_classes = [b.__name__ for b in VllmEmbedding.__mro__] assert BaseEmbedding.__name__ in names_of_base_classes def test_embedding_re...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-vllm/llama_index/embeddings/vllm/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-vllm/llama_index/embeddings/vllm/__init__.py
from llama_index.embeddings.vllm.base import VllmEmbedding __all__ = ["VllmEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-vllm/llama_index/embeddings/vllm/base.py
llama-index-integrations/embeddings/llama-index-embeddings-vllm/llama_index/embeddings/vllm/base.py
from io import BytesIO import logging from typing import Any, Dict, List, Optional, Union from llama_index.core.base.embeddings.base import DEFAULT_EMBED_BATCH_SIZE from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.callbacks import CallbackManager from llama_index.core.embeddings.mu...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-openvino/llama_index/embeddings/huggingface_openvino/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-huggingface-openvino/llama_index/embeddings/huggingface_openvino/__init__.py
from llama_index.embeddings.huggingface_openvino.base import ( OpenVINOEmbedding, OpenVINOClipEmbedding, ) __all__ = ["OpenVINOEmbedding", "OpenVINOClipEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-openvino/llama_index/embeddings/huggingface_openvino/base.py
llama-index-integrations/embeddings/llama-index-embeddings-huggingface-openvino/llama_index/embeddings/huggingface_openvino/base.py
from typing import Any, List, Optional, Dict from pathlib import Path from llama_index.core.base.embeddings.base import ( DEFAULT_EMBED_BATCH_SIZE, BaseEmbedding, Embedding, ) from llama_index.core.schema import ImageType from llama_index.core.bridge.pydantic import Field, PrivateAttr 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-integrations/embeddings/llama-index-embeddings-huggingface-optimum/tests/test_embeddings_huggingface_optimum.py
llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum/tests/test_embeddings_huggingface_optimum.py
from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.embeddings.huggingface_optimum import OptimumEmbedding def test_optimumembedding_class(): names_of_base_classes = [b.__name__ for b in OptimumEmbedding.__mro__] assert BaseEmbedding.__name__ in names_of_base_classes def test_op...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum/tests/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum/llama_index/embeddings/huggingface_optimum/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum/llama_index/embeddings/huggingface_optimum/__init__.py
from llama_index.embeddings.huggingface_optimum.base import OptimumEmbedding __all__ = ["OptimumEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum/llama_index/embeddings/huggingface_optimum/base.py
llama-index-integrations/embeddings/llama-index-embeddings-huggingface-optimum/llama_index/embeddings/huggingface_optimum/base.py
from typing import Any, List, Optional from llama_index.core.base.embeddings.base import ( DEFAULT_EMBED_BATCH_SIZE, BaseEmbedding, ) from llama_index.core.bridge.pydantic import Field, PrivateAttr from llama_index.core.callbacks import CallbackManager from llama_index.core.utils import infer_torch_device from...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-adapter/tests/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-adapter/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-adapter/tests/test_embeddings_adapter.py
llama-index-integrations/embeddings/llama-index-embeddings-adapter/tests/test_embeddings_adapter.py
from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.embeddings.adapter import AdapterEmbeddingModel def test_class(): names_of_base_classes = [b.__name__ for b in AdapterEmbeddingModel.__mro__] assert BaseEmbedding.__name__ in names_of_base_classes
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-adapter/llama_index/embeddings/adapter/utils.py
llama-index-integrations/embeddings/llama-index-embeddings-adapter/llama_index/embeddings/adapter/utils.py
"""Adapter utils.""" import json import logging import os from abc import abstractmethod from typing import Callable, Dict import torch import torch.nn.functional as F from torch import Tensor, nn logger = logging.getLogger(__name__) class BaseAdapter(nn.Module): """ Base adapter. Can be subclassed to...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-adapter/llama_index/embeddings/adapter/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-adapter/llama_index/embeddings/adapter/__init__.py
from llama_index.embeddings.adapter.base import ( AdapterEmbeddingModel, LinearAdapterEmbeddingModel, ) from llama_index.embeddings.adapter.utils import BaseAdapter, LinearLayer __all__ = [ "AdapterEmbeddingModel", "LinearAdapterEmbeddingModel", "BaseAdapter", "LinearLayer", ]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-adapter/llama_index/embeddings/adapter/base.py
llama-index-integrations/embeddings/llama-index-embeddings-adapter/llama_index/embeddings/adapter/base.py
"""Embedding adapter model.""" import logging from typing import Any, List, Optional, Type, cast from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.core.bridge.pydantic import PrivateAttr from llama_index.core.callbacks import CallbackManager from llama_index.core.constants import 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-integrations/embeddings/llama-index-embeddings-langchain/tests/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-langchain/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-langchain/tests/test_embeddings_langchain.py
llama-index-integrations/embeddings/llama-index-embeddings-langchain/tests/test_embeddings_langchain.py
from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.embeddings.langchain import LangchainEmbedding def test_langchain_embedding_class(): names_of_base_classes = [b.__name__ for b in LangchainEmbedding.__mro__] assert BaseEmbedding.__name__ in names_of_base_classes
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-langchain/llama_index/embeddings/langchain/__init__.py
llama-index-integrations/embeddings/llama-index-embeddings-langchain/llama_index/embeddings/langchain/__init__.py
from llama_index.embeddings.langchain.base import LangchainEmbedding __all__ = ["LangchainEmbedding"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-langchain/llama_index/embeddings/langchain/base.py
llama-index-integrations/embeddings/llama-index-embeddings-langchain/llama_index/embeddings/langchain/base.py
"""Langchain Embedding Wrapper Module.""" from typing import TYPE_CHECKING, List, Optional from llama_index.core.base.embeddings.base import ( DEFAULT_EMBED_BATCH_SIZE, BaseEmbedding, ) from llama_index.core.bridge.pydantic import PrivateAttr from llama_index.core.callbacks import CallbackManager if TYPE_CHE...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/agent/llama-index-agent-azure/tests/test_azure_foundry_agent.py
llama-index-integrations/agent/llama-index-agent-azure/tests/test_azure_foundry_agent.py
import pytest import tempfile import json from pathlib import Path from types import SimpleNamespace from unittest.mock import AsyncMock, MagicMock, patch from azure.ai.agents.models import ( MessageInputTextBlock, MessageInputImageFileBlock, MessageInputImageUrlBlock, ) from azure.ai.projects import AIPro...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/agent/llama-index-agent-azure/llama_index/agent/azure_foundry_agent/__init__.py
llama-index-integrations/agent/llama-index-agent-azure/llama_index/agent/azure_foundry_agent/__init__.py
from llama_index.agent.azure_foundry_agent.base import AzureFoundryAgent __all__ = ["AzureFoundryAgent"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/agent/llama-index-agent-azure/llama_index/agent/azure_foundry_agent/base.py
llama-index-integrations/agent/llama-index-agent-azure/llama_index/agent/azure_foundry_agent/base.py
import asyncio import json from typing import List, Sequence, Optional from azure.ai.agents.models import ( MessageInputContentBlock, SubmitToolOutputsAction, RequiredFunctionToolCall, FunctionTool, ToolSet, ) from azure.ai.agents.models._models import ThreadRun from azure.ai.projects.aio import AI...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/tests/test_polars.py
llama-index-experimental/tests/test_polars.py
"""Test polars index.""" import sys from pathlib import Path from typing import Any, Dict, cast import polars as pl import pytest from llama_index.core.base.response.schema import Response from llama_index.core.indices.query.schema import QueryBundle from llama_index.core.llms.mock import MockLLM from llama_index.exp...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/tests/test_exec_utils.py
llama-index-experimental/tests/test_exec_utils.py
from llama_index.experimental.exec_utils import _contains_protected_access def test_contains_protected_access() -> None: assert not _contains_protected_access("def _a(b): pass"), ( "definition of dunder function" ) assert _contains_protected_access("a = _b(c)"), "call to protected function" as...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/tests/test_pandas.py
llama-index-experimental/tests/test_pandas.py
"""Test pandas index.""" import os import sys from pathlib import Path from typing import Any, Dict, cast import pandas as pd import pytest from llama_index.core.base.response.schema import Response from llama_index.core.indices.query.schema import QueryBundle from llama_index.core.llms.mock import MockLLM 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-experimental/tests/__init__.py
llama-index-experimental/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/__init__.py
llama-index-experimental/llama_index/experimental/__init__.py
from llama_index.experimental.query_engine.pandas.pandas_query_engine import ( PandasQueryEngine, ) from llama_index.experimental.query_engine.polars.polars_query_engine import ( PolarsQueryEngine, ) from llama_index.experimental.param_tuner.base import ParamTuner from llama_index.experimental.nudge.base 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-experimental/llama_index/experimental/exec_utils.py
llama-index-experimental/llama_index/experimental/exec_utils.py
import ast import copy from types import CodeType, ModuleType from typing import Any, Dict, Mapping, Sequence, Union ALLOWED_IMPORTS = { "math", "time", "datetime", "pandas", "polars", "scipy", "numpy", "matplotlib", "plotly", "seaborn", } def _restricted_import( name: str...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/query_engine/__init__.py
llama-index-experimental/llama_index/experimental/query_engine/__init__.py
from llama_index.experimental.query_engine.pandas.pandas_query_engine import ( PandasQueryEngine, ) from llama_index.experimental.query_engine.pandas.output_parser import ( PandasInstructionParser, ) from llama_index.experimental.query_engine.polars.polars_query_engine import ( PolarsQueryEngine, ) 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-experimental/llama_index/experimental/query_engine/polars/prompts.py
llama-index-experimental/llama_index/experimental/query_engine/polars/prompts.py
from llama_index.core.prompts import PromptTemplate, PromptType ############################################ # Polars ############################################ DEFAULT_POLARS_TMPL = ( "You are working with a polars dataframe in Python.\n" "The name of the dataframe is `df`.\n" "This is the result of `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-experimental/llama_index/experimental/query_engine/polars/polars_query_engine.py
llama-index-experimental/llama_index/experimental/query_engine/polars/polars_query_engine.py
""" Default query for PolarsIndex. WARNING: This tool provides the LLM with 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 """ import logging ...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/query_engine/polars/output_parser.py
llama-index-experimental/llama_index/experimental/query_engine/polars/output_parser.py
"""Polars output parser.""" import ast import logging import sys import traceback from typing import Any, Dict, Optional import numpy as np import polars as pl from llama_index.core.output_parsers import BaseOutputParser from llama_index.core.output_parsers.utils import parse_code_markdown from llama_index.experiment...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/query_engine/polars/__init__.py
llama-index-experimental/llama_index/experimental/query_engine/polars/__init__.py
"""Init file.""" from llama_index.experimental.query_engine.polars.output_parser import ( PolarsInstructionParser, ) from llama_index.experimental.query_engine.polars.polars_query_engine import ( PolarsQueryEngine, ) __all__ = ["PolarsInstructionParser", "PolarsQueryEngine"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/query_engine/jsonalyze/jsonalyze_query_engine.py
llama-index-experimental/llama_index/experimental/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-experimental/llama_index/experimental/query_engine/jsonalyze/__init__.py
llama-index-experimental/llama_index/experimental/query_engine/jsonalyze/__init__.py
"""Init file.""" from llama_index.experimental.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-experimental/llama_index/experimental/query_engine/pandas/prompts.py
llama-index-experimental/llama_index/experimental/query_engine/pandas/prompts.py
from llama_index.core.prompts import PromptTemplate, PromptType ############################################ # Pandas ############################################ DEFAULT_PANDAS_TMPL = ( "You are working with a pandas dataframe in Python.\n" "The name of the dataframe is `df`.\n" "This is the result of `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-experimental/llama_index/experimental/query_engine/pandas/output_parser.py
llama-index-experimental/llama_index/experimental/query_engine/pandas/output_parser.py
"""Pandas output parser.""" import ast import logging import sys import traceback from typing import Any, Dict, Optional import numpy as np import pandas as pd from llama_index.experimental.exec_utils import safe_eval, safe_exec from llama_index.core.output_parsers import BaseOutputParser from llama_index.core.output...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/query_engine/pandas/__init__.py
llama-index-experimental/llama_index/experimental/query_engine/pandas/__init__.py
"""Init file.""" from llama_index.experimental.query_engine.pandas.output_parser import ( PandasInstructionParser, ) from llama_index.experimental.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-experimental/llama_index/experimental/query_engine/pandas/pandas_query_engine.py
llama-index-experimental/llama_index/experimental/query_engine/pandas/pandas_query_engine.py
""" Default query for PandasIndex. WARNING: This tool provides the LLM with 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 """ import logging ...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/retrievers/natural_language/nl_data_frame_retriever.py
llama-index-experimental/llama_index/experimental/retrievers/natural_language/nl_data_frame_retriever.py
from llama_index.core.callbacks.base import CallbackManager from llama_index.core.constants import DEFAULT_SIMILARITY_TOP_K from llama_index.core.llms import llm from llama_index.core.llms.utils import resolve_llm from llama_index.core.utils import print_text from llama_index.core.retrievers import BaseRetriever from l...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/retrievers/natural_language/__init__.py
llama-index-experimental/llama_index/experimental/retrievers/natural_language/__init__.py
from llama_index.experimental.retrievers.natural_language import ( nl_csv_retriever, nl_data_frame_retriever, nl_json_retriever, ) __all__ = ["nl_data_frame_retriever", "nl_csv_retriever", "nl_json_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-experimental/llama_index/experimental/retrievers/natural_language/nl_csv_retriever.py
llama-index-experimental/llama_index/experimental/retrievers/natural_language/nl_csv_retriever.py
from llama_index.core.callbacks.base import CallbackManager from llama_index.core.constants import DEFAULT_SIMILARITY_TOP_K from llama_index.core.llms import llm from llama_index.core.prompts import BasePromptTemplate from typing import Optional import logging import pandas as pd from llama_index.experimental.retriev...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/retrievers/natural_language/nl_json_retriever.py
llama-index-experimental/llama_index/experimental/retrievers/natural_language/nl_json_retriever.py
from llama_index.core.callbacks.base import CallbackManager from llama_index.core.constants import DEFAULT_SIMILARITY_TOP_K from llama_index.core.llms import llm from llama_index.core.prompts import BasePromptTemplate from typing import Optional import logging import pandas as pd import json from llama_index.experime...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/param_tuner/__init__.py
llama-index-experimental/llama_index/experimental/param_tuner/__init__.py
from llama_index.experimental.param_tuner.base import ( AsyncParamTuner, BaseParamTuner, ParamTuner, RayTuneParamTuner, ) __all__ = ["BaseParamTuner", "ParamTuner", "AsyncParamTuner", "RayTuneParamTuner"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/param_tuner/base.py
llama-index-experimental/llama_index/experimental/param_tuner/base.py
"""Param tuner.""" import asyncio from abc import abstractmethod from copy import deepcopy from typing import Any, Awaitable, Callable, Dict, List, Optional from llama_index.core.bridge.pydantic import BaseModel, Field, PrivateAttr from llama_index.core.utils import get_tqdm_iterable class RunResult(BaseModel): ...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/nudge/__init__.py
llama-index-experimental/llama_index/experimental/nudge/__init__.py
from llama_index.experimental.nudge.base import ( Nudge, ) __all__ = ["Nudge"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-experimental/llama_index/experimental/nudge/base.py
llama-index-experimental/llama_index/experimental/nudge/base.py
import logging from typing import Dict, Optional from llama_index.core.base.embeddings.base import BaseEmbedding from llama_index.core.utils import infer_torch_device from llama_index.finetuning.embeddings.common import EmbeddingQAFinetuneDataset logger = logging.getLogger(__name__) NUDGE_IMPORT_ERROR_MSG = "NUDGE 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-packs/llama-index-packs-vectara-rag/tests/test_packs_vectara_rag.py
llama-index-packs/llama-index-packs-vectara-rag/tests/test_packs_vectara_rag.py
from llama_index.core.llama_pack import BaseLlamaPack from llama_index.packs.vectara_rag import VectaraRagPack def test_class(): names_of_base_classes = [b.__name__ for b in VectaraRagPack.__mro__] assert BaseLlamaPack.__name__ in names_of_base_classes
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-vectara-rag/tests/__init__.py
llama-index-packs/llama-index-packs-vectara-rag/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-vectara-rag/llama_index/packs/vectara_rag/__init__.py
llama-index-packs/llama-index-packs-vectara-rag/llama_index/packs/vectara_rag/__init__.py
from llama_index.packs.vectara_rag.base import VectaraRagPack __all__ = ["VectaraRagPack"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-vectara-rag/llama_index/packs/vectara_rag/base.py
llama-index-packs/llama-index-packs-vectara-rag/llama_index/packs/vectara_rag/base.py
"""Vectara RAG Pack.""" from typing import Any, Dict, List, Optional from llama_index.core.llama_pack.base import BaseLlamaPack from llama_index.core.schema import TextNode from llama_index.indices.managed.vectara import VectaraIndex class VectaraRagPack(BaseLlamaPack): """Vectara RAG pack.""" def __init__...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-amazon-product-extraction/tests/test_packs_amazon_product_extraction.py
llama-index-packs/llama-index-packs-amazon-product-extraction/tests/test_packs_amazon_product_extraction.py
from llama_index.core.llama_pack import BaseLlamaPack from llama_index.packs.amazon_product_extraction import AmazonProductExtractionPack def test_class(): names_of_base_classes = [b.__name__ for b in AmazonProductExtractionPack.__mro__] assert BaseLlamaPack.__name__ in names_of_base_classes
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-amazon-product-extraction/tests/__init__.py
llama-index-packs/llama-index-packs-amazon-product-extraction/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-amazon-product-extraction/llama_index/packs/amazon_product_extraction/__init__.py
llama-index-packs/llama-index-packs-amazon-product-extraction/llama_index/packs/amazon_product_extraction/__init__.py
from llama_index.packs.amazon_product_extraction.base import ( AmazonProductExtractionPack, ) __all__ = ["AmazonProductExtractionPack"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-amazon-product-extraction/llama_index/packs/amazon_product_extraction/base.py
llama-index-packs/llama-index-packs-amazon-product-extraction/llama_index/packs/amazon_product_extraction/base.py
"""Product extraction pack.""" import asyncio from typing import Any, Dict from llama_index.core import SimpleDirectoryReader from llama_index.core.llama_pack.base import BaseLlamaPack from llama_index.core.output_parsers import PydanticOutputParser from llama_index.core.program.multi_modal_llm_program import ( M...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-cohere-citation-chat/tests/__init__.py
llama-index-packs/llama-index-packs-cohere-citation-chat/tests/__init__.py
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-cohere-citation-chat/tests/test_packs_cohere_citation_chat.py
llama-index-packs/llama-index-packs-cohere-citation-chat/tests/test_packs_cohere_citation_chat.py
from llama_index.core.llama_pack import BaseLlamaPack from llama_index.packs.cohere_citation_chat import CohereCitationChatEnginePack def test_class(): names_of_base_classes = [b.__name__ for b in CohereCitationChatEnginePack.__mro__] assert BaseLlamaPack.__name__ in names_of_base_classes
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-cohere-citation-chat/examples/example.py
llama-index-packs/llama-index-packs-cohere-citation-chat/examples/example.py
from llama_index.packs.cohere_citation_chat import CohereCitationChatEnginePack from llama_index.readers.web import SimpleWebPageReader # load documents and create the pack documents = SimpleWebPageReader().load_data( [ "https://raw.githubusercontent.com/jerryjliu/llama_index/adb054429f642cc7bbfcb66d4c232e...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-cohere-citation-chat/llama_index/packs/cohere_citation_chat/utils.py
llama-index-packs/llama-index-packs-cohere-citation-chat/llama_index/packs/cohere_citation_chat/utils.py
from dataclasses import asdict from typing import List from llama_index.core.base.llms.types import ChatResponse from llama_index.core.schema import NodeWithScore from .types import Document, Citation, CitationsSettings def convert_nodes_to_documents_list(nodes: List[NodeWithScore]) -> List[Document]: if nodes:...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-cohere-citation-chat/llama_index/packs/cohere_citation_chat/__init__.py
llama-index-packs/llama-index-packs-cohere-citation-chat/llama_index/packs/cohere_citation_chat/__init__.py
from llama_index.packs.cohere_citation_chat.base import CohereCitationChatEnginePack __all__ = ["CohereCitationChatEnginePack"]
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-cohere-citation-chat/llama_index/packs/cohere_citation_chat/types.py
llama-index-packs/llama-index-packs-cohere-citation-chat/llama_index/packs/cohere_citation_chat/types.py
from typing import List from dataclasses import dataclass, field, asdict @dataclass class Citation: """Citation object.""" text: str start: int end: int document_ids: List[str] dict = asdict @dataclass class Document: """Document object.""" id: str text: str dict = asdict...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false
run-llama/llama_index
https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-packs/llama-index-packs-cohere-citation-chat/llama_index/packs/cohere_citation_chat/base.py
llama-index-packs/llama-index-packs-cohere-citation-chat/llama_index/packs/cohere_citation_chat/base.py
import os from typing import Any, Dict, List from llama_index.core.llama_pack.base import BaseLlamaPack from llama_index.core.chat_engine.types import BaseChatEngine from llama_index.core.schema import Document from .citations_context_chat_engine import VectorStoreIndexWithCitationsChat class CohereCitationChatEngin...
python
MIT
dd5b31109cc8eb64411caf9fc1fa0f51e584c325
2026-01-04T14:39:40.052063Z
false