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-baseten/llama_index/embeddings/baseten/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-baseten/llama_index/embeddings/baseten/__init__.py | from llama_index.embeddings.baseten.base import BasetenEmbedding
__all__ = ["BasetenEmbedding"]
| python | 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-baseten/llama_index/embeddings/baseten/base.py | llama-index-integrations/embeddings/llama-index-embeddings-baseten/llama_index/embeddings/baseten/base.py | from typing import Any, Dict, Optional
import httpx
from llama_index.core.constants import DEFAULT_EMBED_BATCH_SIZE
from llama_index.core.bridge.pydantic import Field
from llama_index.core.callbacks import CallbackManager
from llama_index.core.base.llms.generic_utils import get_from_param_or_env
from llama_index.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-integrations/embeddings/llama-index-embeddings-vertex-endpoint/tests/test_embeddings_vertex_endpoint.py | llama-index-integrations/embeddings/llama-index-embeddings-vertex-endpoint/tests/test_embeddings_vertex_endpoint.py | from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.vertex_endpoint import VertexEndpointEmbedding
def test_text_inference_embedding_class():
names_of_base_classes = [b.__name__ for b in VertexEndpointEmbedding.__mro__]
assert BaseEmbedding.__name__ in names_of_base_cla... | python | 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-vertex-endpoint/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-vertex-endpoint/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-vertex-endpoint/llama_index/embeddings/vertex_endpoint/utils.py | llama-index-integrations/embeddings/llama-index-embeddings-vertex-endpoint/llama_index/embeddings/vertex_endpoint/utils.py | import abc
from typing import List, Any, Dict
class BaseIOHandler(metaclass=abc.ABCMeta):
@classmethod
def __subclasshook__(cls, subclass: type) -> bool:
return (
hasattr(subclass, "serialize_input")
and callable(subclass.serialize_input)
and hasattr(subclass, "dese... | python | 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-vertex-endpoint/llama_index/embeddings/vertex_endpoint/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-vertex-endpoint/llama_index/embeddings/vertex_endpoint/__init__.py | from llama_index.embeddings.vertex_endpoint.base import VertexEndpointEmbedding
__all__ = ["VertexEndpointEmbedding"]
| python | 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-vertex-endpoint/llama_index/embeddings/vertex_endpoint/base.py | llama-index-integrations/embeddings/llama-index-embeddings-vertex-endpoint/llama_index/embeddings/vertex_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 google... | python | 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/tests/test_hf_utils.py | llama-index-integrations/embeddings/llama-index-embeddings-huggingface/tests/test_hf_utils.py | from typing import Any, Dict
from llama_index.core.embeddings.mock_embed_model import MockEmbedding
from llama_index.core.embeddings.utils import resolve_embed_model
from llama_index.embeddings.huggingface import (
HuggingFaceEmbedding,
)
from pytest import MonkeyPatch
def mock_hf_embeddings(self: Any, *args: An... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface/tests/test_embeddings_huggingface.py | llama-index-integrations/embeddings/llama-index-embeddings-huggingface/tests/test_embeddings_huggingface.py | from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.huggingface import (
HuggingFaceEmbedding,
HuggingFaceInferenceAPIEmbedding,
)
def test_huggingfaceembedding_class():
names_of_base_classes = [b.__name__ for b in HuggingFaceEmbedding.__mro__]
assert BaseEmbedd... | python | 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/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-huggingface/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/tests/test_hf_inference.py | llama-index-integrations/embeddings/llama-index-embeddings-huggingface/tests/test_hf_inference.py | from unittest.mock import AsyncMock, MagicMock, patch
import numpy as np
import pytest
from llama_index.embeddings.huggingface.base import HuggingFaceInferenceAPIEmbedding
from llama_index.embeddings.huggingface.pooling import Pooling
STUB_MODEL_NAME = "placeholder_model"
@pytest.fixture(name="hf_inference_api_embe... | python | 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/llama_index/embeddings/huggingface/pooling.py | llama-index-integrations/embeddings/llama-index-embeddings-huggingface/llama_index/embeddings/huggingface/pooling.py | from enum import Enum
from typing import TYPE_CHECKING, Union, overload
import numpy as np
if TYPE_CHECKING:
import torch
class Pooling(str, Enum):
"""Enum of possible pooling choices with pooling behaviors."""
CLS = "cls"
MEAN = "mean"
LAST = "last" # last token pooling
def __call__(self... | python | 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/llama_index/embeddings/huggingface/utils.py | llama-index-integrations/embeddings/llama-index-embeddings-huggingface/llama_index/embeddings/huggingface/utils.py | from typing import Optional
import requests
DEFAULT_HUGGINGFACE_EMBEDDING_MODEL = "BAAI/bge-small-en"
DEFAULT_INSTRUCT_MODEL = "hkunlp/instructor-base"
# Originally pulled from:
# https://github.com/langchain-ai/langchain/blob/v0.0.257/libs/langchain/langchain/embeddings/huggingface.py#L10
DEFAULT_EMBED_INSTRUCTION ... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-huggingface/llama_index/embeddings/huggingface/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-huggingface/llama_index/embeddings/huggingface/__init__.py | from llama_index.embeddings.huggingface.base import (
HuggingFaceEmbedding,
HuggingFaceInferenceAPIEmbedding,
HuggingFaceInferenceAPIEmbeddings,
)
__all__ = [
"HuggingFaceEmbedding",
"HuggingFaceInferenceAPIEmbedding",
"HuggingFaceInferenceAPIEmbeddings",
]
| python | 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/llama_index/embeddings/huggingface/base.py | llama-index-integrations/embeddings/llama-index-embeddings-huggingface/llama_index/embeddings/huggingface/base.py | import asyncio
from io import BytesIO
import logging
from typing import Any, Callable, Dict, List, Optional, Sequence, Union
from deprecated import deprecated
from huggingface_hub import (
AsyncInferenceClient,
InferenceClient,
model_info,
)
from huggingface_hub.hf_api import ModelInfo
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-integrations/embeddings/llama-index-embeddings-google-genai/tests/test_embeddings_gemini.py | llama-index-integrations/embeddings/llama-index-embeddings-google-genai/tests/test_embeddings_gemini.py | import os
import pytest
from unittest.mock import AsyncMock, MagicMock, patch
import numpy as np
import requests
from google.genai.errors import APIError
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.google_genai import GoogleGenAIEmbedding
def test_embedding_class():
... | python | 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-google-genai/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-google-genai/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-google-genai/llama_index/embeddings/google_genai/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-google-genai/llama_index/embeddings/google_genai/__init__.py | from llama_index.embeddings.google_genai.base import GoogleGenAIEmbedding
__all__ = ["GoogleGenAIEmbedding"]
| python | 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-google-genai/llama_index/embeddings/google_genai/base.py | llama-index-integrations/embeddings/llama-index-embeddings-google-genai/llama_index/embeddings/google_genai/base.py | """Gemini embeddings file."""
import os
from tenacity import (
retry,
stop_after_attempt,
wait_exponential,
retry_if_exception,
AsyncRetrying,
)
from typing import Any, Dict, List, Optional, TypedDict, Callable, TypeVar, Awaitable
import requests
from llama_index.core.base.embeddings.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-integrations/embeddings/llama-index-embeddings-bedrock/tests/test_bedrock_embedding.py | llama-index-integrations/embeddings/llama-index-embeddings-bedrock/tests/test_bedrock_embedding.py | import boto3
import pytest
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.bedrock import BedrockEmbedding
def test_class():
names_of_base_classes = [b.__name__ for b in BedrockEmbedding.__mro__]
assert BaseEmbedding.__name__ in names_of_base_classes
def test_get_... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-bedrock/tests/test_bedrock.py | llama-index-integrations/embeddings/llama-index-embeddings-bedrock/tests/test_bedrock.py | import json
from io import BytesIO
from unittest import TestCase
import boto3
import pytest
from botocore.response import StreamingBody
from botocore.stub import ANY as BOTOCORE_ANY
from botocore.stub import Stubber
from llama_index.embeddings.bedrock import BedrockEmbedding, Models
exp_embed = [
0.017410278,
... | python | 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-bedrock/tests/conftest.py | llama-index-integrations/embeddings/llama-index-embeddings-bedrock/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-bedrock/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-bedrock/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-bedrock/tests/test_bedrock_async.py | llama-index-integrations/embeddings/llama-index-embeddings-bedrock/tests/test_bedrock_async.py | import json
from unittest import mock
import aioboto3
import aioboto3.session
import pytest
from llama_index.embeddings.bedrock import BedrockEmbedding, Models
EXP_REQUEST = "foo bar baz"
EXP_RESPONSE = {
"embedding": [
0.017410278,
0.040924072,
-0.007507324,
0.09429932,
0.... | python | 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-bedrock/llama_index/embeddings/bedrock/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-bedrock/llama_index/embeddings/bedrock/__init__.py | from llama_index.embeddings.bedrock.base import BedrockEmbedding, Models
__all__ = ["BedrockEmbedding", "Models"]
| python | 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-bedrock/llama_index/embeddings/bedrock/base.py | llama-index-integrations/embeddings/llama-index-embeddings-bedrock/llama_index/embeddings/bedrock/base.py | import json
import os
import warnings
from enum import Enum
from typing import Any, Callable, Dict, List, Literal, Optional, Sequence, Union
from deprecated import deprecated
from llama_index.core.base.embeddings.base import BaseEmbedding, Embedding
from llama_index.core.base.llms.types import ChatMessage
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-integrations/embeddings/llama-index-embeddings-cloudflare-workersai/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-cloudflare-workersai/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-cloudflare-workersai/tests/test_embeddings_cloudflare-workersai.py | llama-index-integrations/embeddings/llama-index-embeddings-cloudflare-workersai/tests/test_embeddings_cloudflare-workersai.py | from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.cloudflare_workersai import CloudflareEmbedding
def test_embedding_class():
emb = CloudflareEmbedding(account_id="fake_id")
assert isinstance(emb, BaseEmbedding)
| python | 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-cloudflare-workersai/llama_index/embeddings/cloudflare_workersai/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-cloudflare-workersai/llama_index/embeddings/cloudflare_workersai/__init__.py | from llama_index.embeddings.cloudflare_workersai.base import CloudflareEmbedding
__all__ = ["CloudflareEmbedding"]
| python | 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-cloudflare-workersai/llama_index/embeddings/cloudflare_workersai/base.py | llama-index-integrations/embeddings/llama-index-embeddings-cloudflare-workersai/llama_index/embeddings/cloudflare_workersai/base.py | """Cloudflare embeddings file."""
from typing import Any, List, Optional
import requests
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.base import CallbackManager
fro... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-upstage/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-upstage/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-upstage/tests/unit_tests/test_embeddings_upstage.py | llama-index-integrations/embeddings/llama-index-embeddings-upstage/tests/unit_tests/test_embeddings_upstage.py | import pytest
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.upstage import UpstageEmbedding
UPSTAGE_TEST_API_KEY = "upstage_test_key"
@pytest.fixture()
def upstage_embedding():
return pytest.importorskip(
"llama_index.embeddings.upstage", reason="Cannot impor... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-upstage/tests/integration_tests/test_integrations.py | llama-index-integrations/embeddings/llama-index-embeddings-upstage/tests/integration_tests/test_integrations.py | import os
import pytest
from pytest_mock import MockerFixture
MOCK_EMBEDDING_DATA = [1.0, 2.0, 3.0]
UPSTAGE_TEST_API_KEY = "UPSTAGE_TEST_API_KEY"
@pytest.fixture()
def setup_environment(monkeypatch):
monkeypatch.setenv("UPSTAGE_API_KEY", UPSTAGE_TEST_API_KEY)
@pytest.fixture()
def upstage_embedding():
Ups... | python | 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-upstage/llama_index/embeddings/upstage/utils.py | llama-index-integrations/embeddings/llama-index-embeddings-upstage/llama_index/embeddings/upstage/utils.py | import logging
from typing import Optional, Tuple, Callable, Any
import openai
from llama_index.core.base.llms.generic_utils import get_from_param_or_env
from tenacity import (
wait_random_exponential,
wait_exponential,
stop_after_attempt,
retry_if_exception_type,
retry,
before_sleep_log,
)
fro... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-upstage/llama_index/embeddings/upstage/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-upstage/llama_index/embeddings/upstage/__init__.py | from llama_index.embeddings.upstage.base import UpstageEmbedding
__all__ = ["UpstageEmbedding"]
| python | 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-upstage/llama_index/embeddings/upstage/base.py | llama-index-integrations/embeddings/llama-index-embeddings-upstage/llama_index/embeddings/upstage/base.py | import logging
import warnings
from typing import Dict, Any, Optional, List, Tuple
import httpx
from llama_index.core.callbacks import CallbackManager
from llama_index.embeddings.openai import OpenAIEmbedding
from pydantic import Field
from llama_index.embeddings.upstage.utils import (
DEFAULT_UPSTAGE_API_BASE,
... | python | 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-oracleai/tests/test_embeddings_oracleai.py | llama-index-integrations/embeddings/llama-index-embeddings-oracleai/tests/test_embeddings_oracleai.py | from typing import TYPE_CHECKING
from llama_index.core.embeddings import BaseEmbedding
from llama_index.embeddings.oracleai import OracleEmbeddings
if TYPE_CHECKING:
import oracledb
def test_class():
names_of_base_classes = [b.__name__ for b in OracleEmbeddings.__mro__]
assert BaseEmbedding.__name__ in n... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-oracleai/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-oracleai/tests/__init__.py | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false | |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-oracleai/llama_index/embeddings/oracleai/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-oracleai/llama_index/embeddings/oracleai/__init__.py | from llama_index.embeddings.oracleai.base import OracleEmbeddings
__all__ = ["OracleEmbeddings"]
| python | 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-oracleai/llama_index/embeddings/oracleai/base.py | llama-index-integrations/embeddings/llama-index-embeddings-oracleai/llama_index/embeddings/oracleai/base.py | # -----------------------------------------------------------------------------
# Authors:
# Harichandan Roy (hroy)
# David Jiang (ddjiang)
#
# -----------------------------------------------------------------------------
# ...embeddings/oracleai.py
# ----------------------------------------------------------------... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-alephalpha/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-alephalpha/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-alephalpha/tests/test_embeddings_alephalpha.py | llama-index-integrations/embeddings/llama-index-embeddings-alephalpha/tests/test_embeddings_alephalpha.py | from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.alephalpha import AlephAlphaEmbedding
def test_anyscale_class():
emb = AlephAlphaEmbedding(token="fake_token", model="luminous-base")
assert isinstance(emb, BaseEmbedding)
| python | 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-alephalpha/llama_index/embeddings/alephalpha/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-alephalpha/llama_index/embeddings/alephalpha/__init__.py | from llama_index.embeddings.alephalpha.base import AlephAlphaEmbedding
__all__ = ["AlephAlphaEmbedding"]
| python | 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-alephalpha/llama_index/embeddings/alephalpha/base.py | llama-index-integrations/embeddings/llama-index-embeddings-alephalpha/llama_index/embeddings/alephalpha/base.py | from typing import Any, List, Optional, Dict
from aleph_alpha_client import (
Client,
AsyncClient,
Prompt,
SemanticEmbeddingRequest,
SemanticRepresentation,
BatchSemanticEmbeddingRequest,
BatchSemanticEmbeddingResponse,
)
from llama_index.core.base.embeddings.base import (
BaseEmbedding... | python | 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-anyscale/tests/test_anyscale_embedding.py | llama-index-integrations/embeddings/llama-index-embeddings-anyscale/tests/test_anyscale_embedding.py | from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.anyscale import AnyscaleEmbedding
def test_anyscale_class():
emb = AnyscaleEmbedding()
assert isinstance(emb, BaseEmbedding)
| python | 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-anyscale/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-anyscale/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-anyscale/llama_index/embeddings/anyscale/utils.py | llama-index-integrations/embeddings/llama-index-embeddings-anyscale/llama_index/embeddings/anyscale/utils.py | from typing import Optional, Tuple
from llama_index.core.base.llms.generic_utils import get_from_param_or_env
DEFAULT_ANYSCALE_API_BASE = "https://api.endpoints.anyscale.com/v1"
DEFAULT_ANYSCALE_API_VERSION = ""
def resolve_anyscale_credentials(
api_key: Optional[str] = None,
api_base: Optional[str] = None,... | python | 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-anyscale/llama_index/embeddings/anyscale/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-anyscale/llama_index/embeddings/anyscale/__init__.py | from llama_index.embeddings.anyscale.base import AnyscaleEmbedding
__all__ = ["AnyscaleEmbedding"]
| python | 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-anyscale/llama_index/embeddings/anyscale/base.py | llama-index-integrations/embeddings/llama-index-embeddings-anyscale/llama_index/embeddings/anyscale/base.py | from typing import Any, Dict, List, Optional
import httpx
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.embeddings.anyscale.ut... | python | 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-litellm/tests/test_embeddings_litellm.py | llama-index-integrations/embeddings/llama-index-embeddings-litellm/tests/test_embeddings_litellm.py | from pytest_mock import MockerFixture
from llama_index.embeddings.litellm import LiteLLMEmbedding
MOCK_EMBEDDINGS = [[0.1, 0.2, 0.3]]
def test_get_query_embedding(mocker: MockerFixture):
mocker.patch(
"llama_index.embeddings.litellm.base.get_embeddings",
return_value=MOCK_EMBEDDINGS,
)
li... | python | 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-litellm/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-litellm/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-litellm/llama_index/embeddings/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-litellm/llama_index/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-integrations/embeddings/llama-index-embeddings-litellm/llama_index/embeddings/litellm/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-litellm/llama_index/embeddings/litellm/__init__.py | from llama_index.embeddings.litellm.base import LiteLLMEmbedding
__all__ = ["LiteLLMEmbedding"]
| python | 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-litellm/llama_index/embeddings/litellm/base.py | llama-index-integrations/embeddings/llama-index-embeddings-litellm/llama_index/embeddings/litellm/base.py | from typing import Any, List, Optional
from litellm import embedding
from llama_index.core.bridge.pydantic import Field
from llama_index.core.embeddings import BaseEmbedding
def get_embeddings(
api_key: str,
api_base: str,
model_name: str,
input: List[str],
timeout: int = 60,
**kwargs: Any,
)... | python | 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-llamafile/tests/test_embeddings_llamafile.py | llama-index-integrations/embeddings/llama-index-embeddings-llamafile/tests/test_embeddings_llamafile.py | from json import dumps as json_dumps
import httpx
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.llamafile import LlamafileEmbedding
from pytest import MonkeyPatch
BASE_URL = "http://llamafile-host:8080"
def test_embedding_class():
emb = LlamafileEmbedding()
asse... | python | 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-llamafile/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-llamafile/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-llamafile/llama_index/embeddings/llamafile/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-llamafile/llama_index/embeddings/llamafile/__init__.py | from llama_index.embeddings.llamafile.base import LlamafileEmbedding
__all__ = ["LlamafileEmbedding"]
| python | 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-llamafile/llama_index/embeddings/llamafile/base.py | llama-index-integrations/embeddings/llama-index-embeddings-llamafile/llama_index/embeddings/llamafile/base.py | from typing import Optional, List
import httpx
from httpx import Timeout
from llama_index.core.base.embeddings.base import BaseEmbedding, Embedding
from llama_index.core.bridge.pydantic import Field
from llama_index.core.callbacks.base import CallbackManager
DEFAULT_REQUEST_TIMEOUT = 30.0
class LlamafileEmbedding(... | python | 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-genai/tests/test_oci_genai.py | llama-index-integrations/embeddings/llama-index-embeddings-oci-genai/tests/test_oci_genai.py | """Test OCI Generative AI embedding service."""
from unittest.mock import MagicMock
from typing import Any
import pytest
from pytest import MonkeyPatch
from llama_index.embeddings.oci_genai import OCIGenAIEmbeddings
class MockResponseDict(dict):
def __getattr__(self, val) -> Any: # type: ignore[no-untyped-def... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-oci-genai/tests/test_embeddings_oci_genai.py | llama-index-integrations/embeddings/llama-index-embeddings-oci-genai/tests/test_embeddings_oci_genai.py | from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.oci_genai import OCIGenAIEmbeddings
def test_oci_genai_embedding_class():
names_of_base_classes = [b.__name__ for b in OCIGenAIEmbeddings.__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-oci-genai/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-oci-genai/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-genai/llama_index/embeddings/oci_genai/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-oci-genai/llama_index/embeddings/oci_genai/__init__.py | from llama_index.embeddings.oci_genai.base import OCIGenAIEmbeddings
__all__ = ["OCIGenAIEmbeddings"]
| python | 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-genai/llama_index/embeddings/oci_genai/base.py | llama-index-integrations/embeddings/llama-index-embeddings-oci-genai/llama_index/embeddings/oci_genai/base.py | from enum import Enum
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.base import CallbackManager
SUPPORTED_MODELS = {
"coh... | python | 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-netmind/tests/test_embeddings_netmind.py | llama-index-integrations/embeddings/llama-index-embeddings-netmind/tests/test_embeddings_netmind.py | from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.netmind import NetmindEmbedding
def test_embedding_class():
emb = NetmindEmbedding(model_name="fake_model_name", api_key="fake key")
assert isinstance(emb, BaseEmbedding)
| python | 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-netmind/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-netmind/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-netmind/llama_index/embeddings/netmind/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-netmind/llama_index/embeddings/netmind/__init__.py | from llama_index.embeddings.netmind.base import NetmindEmbedding
__all__ = ["NetmindEmbedding"]
| python | 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-netmind/llama_index/embeddings/netmind/base.py | llama-index-integrations/embeddings/llama-index-embeddings-netmind/llama_index/embeddings/netmind/base.py | import os
from typing import Any, List, Optional
from openai import OpenAI, AsyncOpenAI
from llama_index.core.base.embeddings.base import BaseEmbedding, Embedding
from llama_index.core.bridge.pydantic import Field
class NetmindEmbedding(BaseEmbedding):
api_base: str = Field(
default="https://api.netmind.a... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-azure-inference/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-azure-inference/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-azure-inference/tests/test_embeddings_azure_inference.py | llama-index-integrations/embeddings/llama-index-embeddings-azure-inference/tests/test_embeddings_azure_inference.py | from unittest import mock
# import aiohttp to force Pants to include it in the required dependencies
import aiohttp # noqa
import pytest
from azure.ai.inference.models import EmbeddingItem, EmbeddingsResult
from llama_index.core.schema import TextNode
from llama_index.embeddings.azure_inference import AzureAIEmbeddin... | python | 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-azure-inference/llama_index/embeddings/azure_inference/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-azure-inference/llama_index/embeddings/azure_inference/__init__.py | from llama_index.embeddings.azure_inference.base import AzureAIEmbeddingsModel
__all__ = [AzureAIEmbeddingsModel]
| python | 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-azure-inference/llama_index/embeddings/azure_inference/base.py | llama-index-integrations/embeddings/llama-index-embeddings-azure-inference/llama_index/embeddings/azure_inference/base.py | """Azure AI model inference embeddings client."""
import logging
from typing import Any, Dict, List, Optional, Union, TYPE_CHECKING
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.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-integrations/embeddings/llama-index-embeddings-ibm/tests/conftest.py | llama-index-integrations/embeddings/llama-index-embeddings-ibm/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-ibm/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-ibm/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-ibm/tests/test_embeddings_ibm.py | llama-index-integrations/embeddings/llama-index-embeddings-ibm/tests/test_embeddings_ibm.py | from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.ibm import WatsonxEmbeddings
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in WatsonxEmbeddings.__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-ibm/tests/test_ibm.py | llama-index-integrations/embeddings/llama-index-embeddings-ibm/tests/test_ibm.py | import pytest
from typing import List
from unittest.mock import patch, MagicMock
from llama_index.embeddings.ibm import WatsonxEmbeddings
class TestWasonxLLMInference:
TEST_URL = "https://us-south.ml.cloud.ibm.com"
TEST_APIKEY = "apikey"
TEST_PROJECT_ID = "project_id"
TEST_MODEL = "test_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-integrations/embeddings/llama-index-embeddings-ibm/llama_index/embeddings/ibm/utils.py | llama-index-integrations/embeddings/llama-index-embeddings-ibm/llama_index/embeddings/ibm/utils.py | import os
from typing import Dict, Optional, Union
from ibm_watsonx_ai import APIClient
from llama_index.core.base.llms.generic_utils import (
get_from_param_or_env,
)
# Import SecretStr directly from pydantic
# since there is not one in llama_index.core.bridge.pydantic
try:
from pydantic.v1 import SecretStr... | python | 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-ibm/llama_index/embeddings/ibm/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-ibm/llama_index/embeddings/ibm/__init__.py | from llama_index.embeddings.ibm.base import WatsonxEmbeddings
__all__ = ["WatsonxEmbeddings"]
| python | 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-ibm/llama_index/embeddings/ibm/base.py | llama-index-integrations/embeddings/llama-index-embeddings-ibm/llama_index/embeddings/ibm/base.py | from typing import Any, List, Optional, Union, Dict
from llama_index.core.base.embeddings.base import (
DEFAULT_EMBED_BATCH_SIZE,
BaseEmbedding,
)
from llama_index.core.bridge.pydantic import Field, PrivateAttr, SecretStr
from llama_index.core.callbacks.base import CallbackManager
from llama_index.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-integrations/embeddings/llama-index-embeddings-azure-openai/llama_index/embeddings/azure_openai/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-azure-openai/llama_index/embeddings/azure_openai/__init__.py | from llama_index.embeddings.azure_openai.base import (
AzureOpenAIEmbedding,
AzureOpenAI,
AsyncAzureOpenAI,
)
__all__ = ["AzureOpenAIEmbedding", "AzureOpenAI", "AsyncAzureOpenAI"]
| python | 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-azure-openai/llama_index/embeddings/azure_openai/base.py | llama-index-integrations/embeddings/llama-index-embeddings-azure-openai/llama_index/embeddings/azure_openai/base.py | from typing import Annotated, Any, Dict, Optional
import httpx
from llama_index.core.base.llms.generic_utils import get_from_param_or_env
from llama_index.core.bridge.pydantic import (
Field,
PrivateAttr,
WithJsonSchema,
model_validator,
)
from llama_index.core.callbacks.base import CallbackManager
fro... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-mistralai/tests/test_embeddings_mistralai.py | llama-index-integrations/embeddings/llama-index-embeddings-mistralai/tests/test_embeddings_mistralai.py | from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.embeddings.mistralai import MistralAIEmbedding
def test_embedding_class():
emb = MistralAIEmbedding(api_key="fake-key")
assert isinstance(emb, BaseEmbedding)
| python | 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-mistralai/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-mistralai/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-mistralai/llama_index/embeddings/mistralai/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-mistralai/llama_index/embeddings/mistralai/__init__.py | from llama_index.embeddings.mistralai.base import MistralAIEmbedding
__all__ = ["MistralAIEmbedding"]
| python | 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-mistralai/llama_index/embeddings/mistralai/base.py | llama-index-integrations/embeddings/llama-index-embeddings-mistralai/llama_index/embeddings/mistralai/base.py | """MistralAI embeddings file."""
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 PrivateAttr
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.base... | python | 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-siliconflow/tests/test_embeddings_siliconflow.py | llama-index-integrations/embeddings/llama-index-embeddings-siliconflow/tests/test_embeddings_siliconflow.py | import json
import pytest
import types
from requests import Response
from unittest import mock
from typing import Optional, Type
from llama_index.core.embeddings import BaseEmbedding
from llama_index.embeddings.siliconflow import SiliconFlowEmbedding
class MockAsyncResponse:
def __init__(self, json_data) -> None:... | python | 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-siliconflow/tests/conftest.py | llama-index-integrations/embeddings/llama-index-embeddings-siliconflow/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-siliconflow/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-siliconflow/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-siliconflow/llama_index/embeddings/siliconflow/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-siliconflow/llama_index/embeddings/siliconflow/__init__.py | from llama_index.embeddings.siliconflow.base import SiliconFlowEmbedding
__all__ = ["SiliconFlowEmbedding"]
| python | 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-siliconflow/llama_index/embeddings/siliconflow/base.py | llama-index-integrations/embeddings/llama-index-embeddings-siliconflow/llama_index/embeddings/siliconflow/base.py | """SiliconFLow embeddings file."""
import aiohttp
import base64
import functools
import requests
import struct
import tenacity
import asyncio
from typing import Any, Callable, List, Optional
from llama_index.core.bridge.pydantic import Field, PrivateAttr
from llama_index.core.callbacks.base import CallbackManager
from... | python | 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-llm-rails/tests/test_embeddings_llm_rails.py | llama-index-integrations/embeddings/llama-index-embeddings-llm-rails/tests/test_embeddings_llm_rails.py | import pytest
from llama_index.embeddings.llm_rails import LLMRailsEmbedding
@pytest.fixture()
def model_id() -> str:
# Replace with model name
return "your_model_id"
@pytest.fixture()
def api_key() -> str:
# Replace with your api key
return "your_api_key"
def test_llm_rails_embedding_constructor(... | python | 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-llm-rails/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-llm-rails/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-llm-rails/llama_index/embeddings/llm_rails/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-llm-rails/llama_index/embeddings/llm_rails/__init__.py | from llama_index.embeddings.llm_rails.base import LLMRailsEmbedding, LLMRailsEmbeddings
__all__ = ["LLMRailsEmbedding", "LLMRailsEmbeddings"]
| python | 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-llm-rails/llama_index/embeddings/llm_rails/base.py | llama-index-integrations/embeddings/llama-index-embeddings-llm-rails/llama_index/embeddings/llm_rails/base.py | import logging
from typing import Any, List
import requests
from llama_index.core.base.embeddings.base import BaseEmbedding
from requests.adapters import HTTPAdapter, Retry
logger = logging.getLogger(__name__)
class LLMRailsEmbedding(BaseEmbedding):
"""
LLMRails embedding models.
This class provides an... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/embeddings/llama-index-embeddings-premai/llama_index/embeddings/premai/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-premai/llama_index/embeddings/premai/__init__.py | from llama_index.embeddings.premai.base import PremAIEmbeddings
__all__ = ["PremAIEmbeddings"]
| python | 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-premai/llama_index/embeddings/premai/base.py | llama-index-integrations/embeddings/llama-index-embeddings-premai/llama_index/embeddings/premai/base.py | """PremAI embeddings file."""
from typing import Any, List, Optional
from llama_index.core.base.embeddings.base import (
BaseEmbedding,
)
from llama_index.core.bridge.pydantic import PrivateAttr
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.base.llms.generic_utils import get_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-integrations/embeddings/llama-index-embeddings-nomic/tests/test_embeddings_nomic.py | llama-index-integrations/embeddings/llama-index-embeddings-nomic/tests/test_embeddings_nomic.py | from llama_index.core.embeddings import MultiModalEmbedding
from llama_index.embeddings.nomic import NomicEmbedding
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in NomicEmbedding.__mro__]
assert MultiModalEmbedding.__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-nomic/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-nomic/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-nomic/llama_index/embeddings/nomic/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-nomic/llama_index/embeddings/nomic/__init__.py | from llama_index.embeddings.nomic.base import NomicEmbedding
__all__ = ["NomicEmbedding"]
| python | 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-nomic/llama_index/embeddings/nomic/base.py | llama-index-integrations/embeddings/llama-index-embeddings-nomic/llama_index/embeddings/nomic/base.py | from enum import Enum
from typing import Any, List, Optional, Union
import nomic
import nomic.embed
import warnings
from PIL import Image
import torch
from llama_index.core.base.embeddings.base import (
DEFAULT_EMBED_BATCH_SIZE,
)
from llama_index.core.bridge.pydantic import Field, PrivateAttr
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-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/tests/__init__.py | llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/tests/__init__.py | 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.