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/llms/llama-index-llms-groq/llama_index/llms/groq/base.py | llama-index-integrations/llms/llama-index-llms-groq/llama_index/llms/groq/base.py | import os
from typing import Any, Optional
from llama_index.llms.openai_like import OpenAILike
class Groq(OpenAILike):
"""
Groq LLM.
Examples:
`pip install llama-index-llms-groq`
```python
from llama_index.llms.groq import Groq
# Set up the Groq class with the required ... | python | 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/llms/llama-index-llms-featherlessai/tests/test_llms_featherlessai.py | llama-index-integrations/llms/llama-index-llms-featherlessai/tests/test_llms_featherlessai.py | from llama_index.core.base.llms.base import BaseLLM
from llama_index.llms.featherlessai import FeatherlessLLM
def test_llm_class():
names_of_base_classes = [b.__name__ for b in FeatherlessLLM.__mro__]
assert BaseLLM.__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/llms/llama-index-llms-featherlessai/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-featherlessai/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/llms/llama-index-llms-featherlessai/llama_index/llms/featherlessai/__init__.py | llama-index-integrations/llms/llama-index-llms-featherlessai/llama_index/llms/featherlessai/__init__.py | from llama_index.llms.featherlessai.base import FeatherlessLLM
__all__ = ["FeatherlessLLM"]
| python | 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/llms/llama-index-llms-featherlessai/llama_index/llms/featherlessai/base.py | llama-index-integrations/llms/llama-index-llms-featherlessai/llama_index/llms/featherlessai/base.py | import os
from typing import Any, Optional
from llama_index.llms.openai_like import OpenAILike
class FeatherlessLLM(OpenAILike):
"""
Featherless LLM.
Examples:
`pip install llama-index-llms-featherlessai`
```python
from llama_index.llms.featherlessai import FeatherlessLLM
... | python | 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/llms/llama-index-llms-heroku/tests/conftest.py | llama-index-integrations/llms/llama-index-llms-heroku/tests/conftest.py | import os
import pytest
from typing import Generator
@pytest.fixture(autouse=True)
def clean_env() -> Generator[None, None, None]:
"""Clean up environment variables before and after each test."""
# Store original environment variables
original_env = {}
for key in ["INFERENCE_KEY", "INFERENCE_URL", "IN... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-heroku/tests/test_api_key.py | llama-index-integrations/llms/llama-index-llms-heroku/tests/test_api_key.py | import os
import pytest
from typing import Any
from pytest_httpx import HTTPXMock
from llama_index.llms.heroku import Heroku
@pytest.fixture()
def mock_heroku_models(httpx_mock: HTTPXMock):
"""Mock Heroku models endpoint response."""
mock_response = {
"data": [
{
"id": "cl... | python | 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/llms/llama-index-llms-heroku/tests/test_integration.py | llama-index-integrations/llms/llama-index-llms-heroku/tests/test_integration.py | from typing import Annotated
import pytest
from pytest_httpx import HTTPXMock
from llama_index.llms.heroku import Heroku
from llama_index.core.llms import ChatMessage, MessageRole
from llama_index.core.tools import FunctionTool
@pytest.fixture()
def mock_heroku_chat_completion(httpx_mock: HTTPXMock):
"""Mock Her... | python | 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/llms/llama-index-llms-heroku/llama_index/llms/heroku/__init__.py | llama-index-integrations/llms/llama-index-llms-heroku/llama_index/llms/heroku/__init__.py | from llama_index.llms.heroku.base import Heroku
__all__ = ["Heroku"]
| python | 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/llms/llama-index-llms-heroku/llama_index/llms/heroku/base.py | llama-index-integrations/llms/llama-index-llms-heroku/llama_index/llms/heroku/base.py | from typing import Any, Optional
from llama_index.core.bridge.pydantic import PrivateAttr
from llama_index.core.base.llms.generic_utils import (
get_from_param_or_env,
)
from llama_index.llms.openai_like import OpenAILike
class Heroku(OpenAILike):
"""Heroku Managed Inference LLM Integration."""
_client:... | python | 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/llms/llama-index-llms-pipeshift/tests/test_llms_pipeshift.py | llama-index-integrations/llms/llama-index-llms-pipeshift/tests/test_llms_pipeshift.py | from llama_index.core.base.llms.base import BaseLLM
from llama_index.llms.pipeshift import Pipeshift
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in Pipeshift.__mro__]
assert BaseLLM.__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/llms/llama-index-llms-pipeshift/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-pipeshift/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/llms/llama-index-llms-pipeshift/llama_index/llms/pipeshift/__init__.py | llama-index-integrations/llms/llama-index-llms-pipeshift/llama_index/llms/pipeshift/__init__.py | from llama_index.llms.pipeshift.base import Pipeshift
__all__ = ["Pipeshift"]
| python | 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/llms/llama-index-llms-pipeshift/llama_index/llms/pipeshift/base.py | llama-index-integrations/llms/llama-index-llms-pipeshift/llama_index/llms/pipeshift/base.py | import os
from typing import Any, Optional
from llama_index.llms.openai_like import OpenAILike
DEFAULT_API_BASE = "https://api.pipeshift.com/api/v0"
def validate_api_key_and_model(api_key: str, model: str) -> None:
"""
Validate the API key and model name.
Args:
api_key (str): The API key to val... | python | 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/llms/llama-index-llms-novita/tests/conftest.py | llama-index-integrations/llms/llama-index-llms-novita/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/llms/llama-index-llms-novita/tests/test_llms_novita.py | llama-index-integrations/llms/llama-index-llms-novita/tests/test_llms_novita.py | import os
from datetime import datetime
import pytest
from llama_index.core.base.llms.base import BaseLLM
from llama_index.core.tools import FunctionTool
from llama_index.llms.novita import NovitaAI
model = "meta-llama/llama-3.1-8b-instruct"
model_function_calling = "deepseek/deepseek_v3"
api_key = os.environ.get("NO... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-novita/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-novita/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/llms/llama-index-llms-novita/llama_index/llms/novita/__init__.py | llama-index-integrations/llms/llama-index-llms-novita/llama_index/llms/novita/__init__.py | from llama_index.llms.novita.base import NovitaAI
__all__ = ["NovitaAI"]
| python | 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/llms/llama-index-llms-novita/llama_index/llms/novita/base.py | llama-index-integrations/llms/llama-index-llms-novita/llama_index/llms/novita/base.py | from typing import Any, Dict, Optional
from llama_index.core.base.llms.generic_utils import (
get_from_param_or_env,
)
from llama_index.llms.openai_like import OpenAILike
DEFAULT_API_BASE = "https://api.novita.ai/v3/openai"
DEFAULT_MODEL = "deepseek/deepseek_v3"
def is_function_calling_model(model: str) -> bool... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-maritalk/llama_index/llms/maritalk/__init__.py | llama-index-integrations/llms/llama-index-llms-maritalk/llama_index/llms/maritalk/__init__.py | from llama_index.llms.maritalk.base import Maritalk
__all__ = ["Maritalk"]
| python | 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/llms/llama-index-llms-maritalk/llama_index/llms/maritalk/base.py | llama-index-integrations/llms/llama-index-llms-maritalk/llama_index/llms/maritalk/base.py | from typing import Any, Sequence, Any, Dict, List, Union
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
MessageRole,
)
from llama_inde... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-deepinfra/tests/test_llms_deepinfra.py | llama-index-integrations/llms/llama-index-llms-deepinfra/tests/test_llms_deepinfra.py | from llama_index.llms.deepinfra import DeepInfraLLM
from llama_index.core.llms.llm import LLM
def test_llm_class():
names_of_base_classes = [b.__name__ for b in DeepInfraLLM.__mro__]
assert LLM.__name__ in names_of_base_classes
def test_deepinfra_llm_class():
model = DeepInfraLLM(api_key="test")
ass... | python | 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/llms/llama-index-llms-deepinfra/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-deepinfra/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/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/client.py | llama-index-integrations/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/client.py | import aiohttp
import requests
from typing import Any, Dict, Generator, AsyncGenerator, Optional
from llama_index.llms.deepinfra.utils import (
retry_request,
maybe_decode_sse_data,
aretry_request,
)
from llama_index.llms.deepinfra.constants import API_BASE, USER_AGENT
class DeepInfraClient:
def __in... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/constants.py | llama-index-integrations/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/constants.py | """DeepInfra API base URL."""
API_BASE = "https://api.deepinfra.com"
"""DeepInfra Inference API endpoint."""
INFERENCE_ENDPOINT = "v1/openai/completions"
"""Chat API endpoint for DeepInfra."""
CHAT_API_ENDPOINT = "v1/openai/chat/completions"
"""Environment variable name of DeepInfra API token."""
ENV_VARIABLE = "DEEPI... | python | 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/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/utils.py | llama-index-integrations/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/utils.py | import json
from typing import Union, Sequence, Dict, Any, Callable
from tenacity import (
retry,
stop_after_attempt,
wait_exponential,
retry_if_exception_type,
)
from asyncio import iscoroutinefunction
from requests.exceptions import Timeout, ConnectionError
from llama_index.core.base.llms.types impo... | python | 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/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/__init__.py | llama-index-integrations/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/__init__.py | from llama_index.llms.deepinfra.base import DeepInfraLLM
__all__ = ["DeepInfraLLM"]
| python | 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/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/types.py | llama-index-integrations/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/types.py | from pydantic import BaseModel
from typing_extensions import Literal
class Function(BaseModel):
name: str
"""The name of the function."""
arguments: str
"""The arguments of the function."""
class ToolCallMessage(BaseModel):
id: str
"""The ID of the tool call."""
function: Function
"... | python | 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/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/base.py | llama-index-integrations/llms/llama-index-llms-deepinfra/llama_index/llms/deepinfra/base.py | import json
from typing import Any, Callable, Dict, Optional, Sequence, List, Union, TYPE_CHECKING
from llama_index.core.bridge.pydantic import Field, PrivateAttr
from llama_index.core.constants import DEFAULT_TEMPERATURE
from llama_index.core.types import BaseOutputParser, PydanticProgramMode
from llama_index.core.ca... | python | 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/llms/llama-index-llms-optimum-intel/llama_index/llms/optimum_intel/__init__.py | llama-index-integrations/llms/llama-index-llms-optimum-intel/llama_index/llms/optimum_intel/__init__.py | from llama_index.llms.optimum_intel.base import OptimumIntelLLM
__all__ = ["OptimumIntelLLM"]
| python | 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/llms/llama-index-llms-optimum-intel/llama_index/llms/optimum_intel/base.py | llama-index-integrations/llms/llama-index-llms-optimum-intel/llama_index/llms/optimum_intel/base.py | import logging
from typing import Any, Callable, List, Optional, Sequence, Union
from llama_index.core.base.llms.types import ChatMessage
from llama_index.core.bridge.pydantic import Field
from llama_index.llms.huggingface.base import HuggingFaceLLM
from llama_index.core.callbacks import CallbackManager
from llama_ind... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-vllm/tests/test_llms_vllm.py | llama-index-integrations/llms/llama-index-llms-vllm/tests/test_llms_vllm.py | from llama_index.core.base.llms.base import BaseLLM
from llama_index.core.callbacks import CallbackManager
def test_embedding_class():
from llama_index.llms.vllm import Vllm
names_of_base_classes = [b.__name__ for b in Vllm.__mro__]
assert BaseLLM.__name__ in names_of_base_classes
def test_server_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/llms/llama-index-llms-vllm/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-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/llms/llama-index-llms-vllm/tests/test_integration.py | llama-index-integrations/llms/llama-index-llms-vllm/tests/test_integration.py | import asyncio
import os
from llama_index.core.base.llms.types import MessageRole, ChatMessage, ChatResponse
from llama_index.core.base.llms.types import CompletionResponse
from vcr.record_mode import RecordMode
from vcr.unittest import VCRTestCase
def remote_vllm():
from llama_index.llms.vllm import VllmServer... | python | 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/llms/llama-index-llms-vllm/llama_index/llms/vllm/utils.py | llama-index-integrations/llms/llama-index-llms-vllm/llama_index/llms/vllm/utils.py | import json
from typing import Iterable, List
import requests
def get_response(response: requests.Response) -> List[str]:
data = json.loads(response.content)
return data["text"]
def post_http_request(
api_url: str, sampling_params: dict = {}, stream: bool = False
) -> requests.Response:
headers = {... | python | 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/llms/llama-index-llms-vllm/llama_index/llms/vllm/__init__.py | llama-index-integrations/llms/llama-index-llms-vllm/llama_index/llms/vllm/__init__.py | from llama_index.llms.vllm.base import Vllm, VllmServer
__all__ = ["Vllm", "VllmServer"]
| python | 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/llms/llama-index-llms-vllm/llama_index/llms/vllm/base.py | llama-index-integrations/llms/llama-index-llms-vllm/llama_index/llms/vllm/base.py | import json
from typing import Any, Callable, Dict, List, Optional, Sequence
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
)
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/llms/llama-index-llms-everlyai/tests/test_llms_everlyai.py | llama-index-integrations/llms/llama-index-llms-everlyai/tests/test_llms_everlyai.py | from llama_index.core.base.llms.base import BaseLLM
from llama_index.llms.everlyai import EverlyAI
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in EverlyAI.__mro__]
assert BaseLLM.__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/llms/llama-index-llms-everlyai/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-everlyai/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/llms/llama-index-llms-everlyai/llama_index/llms/everlyai/utils.py | llama-index-integrations/llms/llama-index-llms-everlyai/llama_index/llms/everlyai/utils.py | from typing import Dict
LLAMA_MODELS = {
"meta-llama/Llama-2-7b-chat-hf": 4096,
}
ALL_AVAILABLE_MODELS = {
**LLAMA_MODELS,
}
DISCONTINUED_MODELS: Dict[str, int] = {}
def everlyai_modelname_to_contextsize(modelname: str) -> int:
"""
Calculate the maximum number of tokens possible to generate for a 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-integrations/llms/llama-index-llms-everlyai/llama_index/llms/everlyai/__init__.py | llama-index-integrations/llms/llama-index-llms-everlyai/llama_index/llms/everlyai/__init__.py | from llama_index.llms.everlyai.base import EverlyAI
__all__ = ["EverlyAI"]
| python | 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/llms/llama-index-llms-everlyai/llama_index/llms/everlyai/base.py | llama-index-integrations/llms/llama-index-llms-everlyai/llama_index/llms/everlyai/base.py | from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.core.base.llms.types import ChatMessage, LLMMetadata
from llama_index.core.callbacks import CallbackManager
from llama_index.core.constants import DEFAULT_NUM_OUTPUTS, DEFAULT_TEMPERATURE
from llama_index.core.base.llms.generic_utils import ge... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-openrouter/tests/test_llms_openrouter.py | llama-index-integrations/llms/llama-index-llms-openrouter/tests/test_llms_openrouter.py | from llama_index.core.base.llms.base import BaseLLM
from llama_index.llms.openrouter import OpenRouter
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in OpenRouter.__mro__]
assert BaseLLM.__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/llms/llama-index-llms-openrouter/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-openrouter/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/llms/llama-index-llms-openrouter/llama_index/llms/openrouter/__init__.py | llama-index-integrations/llms/llama-index-llms-openrouter/llama_index/llms/openrouter/__init__.py | from llama_index.llms.openrouter.base import OpenRouter
__all__ = ["OpenRouter"]
| python | 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/llms/llama-index-llms-openrouter/llama_index/llms/openrouter/base.py | llama-index-integrations/llms/llama-index-llms-openrouter/llama_index/llms/openrouter/base.py | from typing import Any, Dict, Optional
from llama_index.core.base.llms.types import LLMMetadata
from llama_index.core.bridge.pydantic import Field
from llama_index.core.constants import (
DEFAULT_CONTEXT_WINDOW,
DEFAULT_NUM_OUTPUTS,
DEFAULT_TEMPERATURE,
)
from llama_index.core.base.llms.generic_utils 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/llms/llama-index-llms-octoai/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-octoai/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/llms/llama-index-llms-octoai/tests/test_llms_octoai.py | llama-index-integrations/llms/llama-index-llms-octoai/tests/test_llms_octoai.py | import os
import pytest
from llama_index.core.base.llms.base import BaseLLM
from llama_index.core.base.llms.types import ChatMessage, MessageRole
from llama_index.llms.octoai import OctoAI
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in OctoAI.__mro__]
assert BaseLLM.__name__ in name... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-octoai/llama_index/llms/octoai/utils.py | llama-index-integrations/llms/llama-index-llms-octoai/llama_index/llms/octoai/utils.py | import logging
from typing import Dict, Sequence
from octoai.text_gen import ChatMessage as OctoAIChatMessage
from llama_index.core.base.llms.types import ChatMessage
TEXT_MODELS: Dict[str, int] = {
"codellama-13b-instruct": 16384,
"codellama-34b-instruct": 16384,
"codellama-7b-instruct": 4096,
"met... | python | 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/llms/llama-index-llms-octoai/llama_index/llms/octoai/__init__.py | llama-index-integrations/llms/llama-index-llms-octoai/llama_index/llms/octoai/__init__.py | from llama_index.llms.octoai.base import OctoAI
__all__ = ["OctoAI"]
| python | 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/llms/llama-index-llms-octoai/llama_index/llms/octoai/base.py | llama-index-integrations/llms/llama-index-llms-octoai/llama_index/llms/octoai/base.py | from typing import (
Any,
Dict,
Optional,
Sequence,
)
from llama_index.core.base.llms.generic_utils import (
get_from_param_or_env,
chat_to_completion_decorator,
stream_chat_to_completion_decorator,
)
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
Chat... | python | 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/llms/llama-index-llms-nvidia/tests/test_mode_switch.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_mode_switch.py | import pytest
from llama_index.llms.nvidia import NVIDIA as Interface
from llama_index.llms.nvidia.base import BASE_URL
from pytest_httpx import HTTPXMock
UNKNOWN_URLS = [
"https://test_url/v1",
"https://test_url/v1/",
"http://test_url/v1",
"http://test_url/v1/",
]
@pytest.fixture()
def mock_unknown... | python | 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/llms/llama-index-llms-nvidia/tests/test_nvidia.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_nvidia.py | import os
from typing import Any, AsyncGenerator, Generator, Optional
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from llama_index.core.base.llms.types import ChatMessage, LLMMetadata
from llama_index.llms.nvidia import NVIDIA
from openai.types.chat.chat_completion import (
ChatCompletion,
... | python | 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/llms/llama-index-llms-nvidia/tests/test_additional_kwargs.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_additional_kwargs.py | import pytest
from llama_index.llms.nvidia import NVIDIA
@pytest.mark.integration
def test_additional_kwargs_success(chat_model: str, mode: dict) -> None:
client = NVIDIA(chat_model, **mode)
assert client.complete(
"Hello, world!",
stop=["cat", "Cats"],
seed=42,
frequency_pena... | python | 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/llms/llama-index-llms-nvidia/tests/test_tools.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_tools.py | import json
from typing import (
Any,
AsyncGenerator,
Generator,
)
from unittest.mock import MagicMock, patch
import pytest
from llama_index.core.tools.function_tool import FunctionTool
from llama_index.llms.nvidia import NVIDIA
from openai.types.chat.chat_completion import ChatCompletion, Choice
from opena... | python | 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/llms/llama-index-llms-nvidia/tests/test_structured_output.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_structured_output.py | from pydantic import BaseModel
from typing import Any, AsyncGenerator, List
from llama_index.llms.nvidia import NVIDIA as Interface
from llama_index.core.program import LLMTextCompletionProgram
from llama_index.core.program import FunctionCallingProgram
import pytest
from llama_index.llms.nvidia.utils import (
MODE... | python | 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/llms/llama-index-llms-nvidia/tests/conftest.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/conftest.py | # pants requires this import to recognize the dep
import pytest_asyncio # noqa: F401
import pytest
import os
from typing import Generator
# this fixture is used to mask the NVIDIA_API_KEY environment variable and restore it
# after the test. it also returns the value of the NVIDIA_API_KEY environment variable
# b... | python | 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/llms/llama-index-llms-nvidia/tests/test_api_key.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_api_key.py | import os
import pytest
from llama_index.llms.nvidia import NVIDIA
from typing import Any
from pytest_httpx import HTTPXMock
@pytest.fixture()
def mock_local_models(httpx_mock: HTTPXMock):
mock_response = {
"data": [
{
"id": "model1",
"object": "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/llms/llama-index-llms-nvidia/tests/test_base_url.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_base_url.py | import pytest
from llama_index.llms.nvidia import NVIDIA as Interface
from pytest_httpx import HTTPXMock
@pytest.fixture()
def mock_local_models(httpx_mock: HTTPXMock, base_url: str) -> None:
mock_response = {
"data": [
{
"id": "dummy",
"object": "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/llms/llama-index-llms-nvidia/tests/test_available_models.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_available_models.py | import pytest
from llama_index.llms.nvidia import NVIDIA
@pytest.mark.integration
def test_available_models(mode: dict) -> None:
models = NVIDIA(**mode).available_models
assert models
assert isinstance(models, list)
assert all(isinstance(model.id, str) for model in 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/llms/llama-index-llms-nvidia/tests/test_unknown_models.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_unknown_models.py | import pytest
from unittest.mock import patch, MagicMock
from llama_index.llms.nvidia import NVIDIA
@pytest.mark.parametrize("is_chat_model", [True, False])
def test_unknown_model_is_chat_model_parameter(is_chat_model) -> None:
"""Test that is_chat_model parameter is respected for unknown models."""
mock_mode... | python | 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/llms/llama-index-llms-nvidia/tests/test_integration.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_integration.py | import pytest
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
CompletionResponse,
)
from llama_index.llms.nvidia import NVIDIA
@pytest.mark.integration
def test_chat(chat_model: str, mode: dict) -> None:
message = ChatMessage(content="Hello")
response = NVIDIA(model=chat_... | python | 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/llms/llama-index-llms-nvidia/tests/test_text-completion.py | llama-index-integrations/llms/llama-index-llms-nvidia/tests/test_text-completion.py | import os
from typing import Any, Optional, Generator, AsyncGenerator
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from llama_index.core.base.llms.types import (
LLMMetadata,
)
from llama_index.llms.nvidia import NVIDIA as Interface
from llama_index.llms.nvidia.utils import COMPLETION_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/llms/llama-index-llms-nvidia/llama_index/llms/nvidia/utils.py | llama-index-integrations/llms/llama-index-llms-nvidia/llama_index/llms/nvidia/utils.py | from typing import Optional, Literal
import warnings
# from dataclasses import dataclass
from llama_index.core.bridge.pydantic import BaseModel, model_validator
DEFAULT_MODEL = "meta/llama3-8b-instruct"
BASE_URL = "https://integrate.api.nvidia.com/v1/"
class Model(BaseModel):
"""
Model information.
id: ... | python | 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/llms/llama-index-llms-nvidia/llama_index/llms/nvidia/__init__.py | llama-index-integrations/llms/llama-index-llms-nvidia/llama_index/llms/nvidia/__init__.py | from llama_index.llms.nvidia.base import NVIDIA
__all__ = ["NVIDIA"]
| python | 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/llms/llama-index-llms-nvidia/llama_index/llms/nvidia/base.py | llama-index-integrations/llms/llama-index-llms-nvidia/llama_index/llms/nvidia/base.py | from typing import Any, Optional, List, Literal, Union, Dict, TYPE_CHECKING
from deprecated import deprecated
import warnings
import json
import os
from llama_index.core.bridge.pydantic import PrivateAttr
from llama_index.core.base.llms.generic_utils import (
get_from_param_or_env,
)
from llama_index.llms.openai_... | python | 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/llms/llama-index-llms-bedrock-converse/tests/test_thinking_delta.py | llama-index-integrations/llms/llama-index-llms-bedrock-converse/tests/test_thinking_delta.py | from unittest.mock import MagicMock
import pytest
from llama_index.core.base.llms.types import (
ChatMessage,
MessageRole,
ThinkingBlock,
TextBlock,
)
from llama_index.llms.bedrock_converse import BedrockConverse
@pytest.fixture
def mock_bedrock_client():
return MagicMock()
@pytest.fixture
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/llms/llama-index-llms-bedrock-converse/tests/test_bedrock_converse_utils.py | llama-index-integrations/llms/llama-index-llms-bedrock-converse/tests/test_bedrock_converse_utils.py | from io import BytesIO
from typing import Literal
from unittest.mock import MagicMock, patch
import aioboto3
import pytest
from botocore.config import Config
from llama_index.core.base.llms.types import (
AudioBlock,
CacheControl,
CachePoint,
ChatMessage,
ImageBlock,
MessageRole,
TextBlock,... | python | 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/llms/llama-index-llms-bedrock-converse/tests/conftest.py | llama-index-integrations/llms/llama-index-llms-bedrock-converse/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/llms/llama-index-llms-bedrock-converse/tests/test_llms_bedrock_converse.py | llama-index-integrations/llms/llama-index-llms-bedrock-converse/tests/test_llms_bedrock_converse.py | import random
import string
import json
import os
from llama_index.core.base.llms.types import ImageBlock, TextBlock
import pytest
from llama_index.llms.bedrock_converse import BedrockConverse
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
MessageRole,
CompletionResponse,
... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | true |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-bedrock-converse/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-bedrock-converse/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/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/utils.py | llama-index-integrations/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/utils.py | import base64
import json
import logging
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Sequence,
Tuple,
Literal,
Union,
)
from typing_extensions import TypedDict
from tenacity import (
before_sleep_log,
retry,
retry_if_exception_type,
stop_after_attempt,
... | python | 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/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/__init__.py | llama-index-integrations/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/__init__.py | from llama_index.llms.bedrock_converse.base import BedrockConverse
__all__ = ["BedrockConverse"]
| python | 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/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/base.py | llama-index-integrations/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/base.py | import warnings
from typing import (
Any,
Callable,
Dict,
List,
Literal,
Optional,
Sequence,
Tuple,
Union,
TYPE_CHECKING,
)
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseGen,
ChatResponseAsyncGen,
CompletionResponseAsyn... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | true |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-monsterapi/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-monsterapi/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/llms/llama-index-llms-monsterapi/tests/test_llms_monsterapi.py | llama-index-integrations/llms/llama-index-llms-monsterapi/tests/test_llms_monsterapi.py | from llama_index.core.base.llms.base import BaseLLM
from llama_index.llms.monsterapi import MonsterLLM
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in MonsterLLM.__mro__]
assert BaseLLM.__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/llms/llama-index-llms-monsterapi/llama_index/llms/monsterapi/__init__.py | llama-index-integrations/llms/llama-index-llms-monsterapi/llama_index/llms/monsterapi/__init__.py | from llama_index.llms.monsterapi.base import MonsterLLM
__all__ = ["MonsterLLM"]
| python | 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/llms/llama-index-llms-monsterapi/llama_index/llms/monsterapi/base.py | llama-index-integrations/llms/llama-index-llms-monsterapi/llama_index/llms/monsterapi/base.py | from typing import Any, Callable, Dict, Optional, Sequence
import requests
from llama_index.core.base.llms.types import ChatMessage, LLMMetadata
from llama_index.core.callbacks import CallbackManager
from llama_index.core.constants import DEFAULT_NUM_OUTPUTS, DEFAULT_TEMPERATURE
from llama_index.core.base.llms.generi... | python | 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/llms/llama-index-llms-ovhcloud/tests/test_coverage_comprehensive.py | llama-index-integrations/llms/llama-index-llms-ovhcloud/tests/test_coverage_comprehensive.py | #!/usr/bin/env python3
"""
Comprehensive test coverage for OVHcloud AI Endpoints dynamic validation functions.
This file ensures all lines in utils.py and base.py are covered.
"""
import sys
from unittest.mock import Mock, patch
from llama_index.llms.ovhcloud.utils import Model
from llama_index.llms.ovhcloud.base impo... | python | 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/llms/llama-index-llms-ovhcloud/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-ovhcloud/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/llms/llama-index-llms-ovhcloud/tests/test_llms_ovhcloud.py | llama-index-integrations/llms/llama-index-llms-ovhcloud/tests/test_llms_ovhcloud.py | from llama_index.core.base.llms.base import BaseLLM
from llama_index.llms.ovhcloud import OVHcloud
def test_text_inference_embedding_class():
names_of_base_classes = [b.__name__ for b in OVHcloud.__mro__]
assert BaseLLM.__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/llms/llama-index-llms-ovhcloud/llama_index/llms/ovhcloud/utils.py | llama-index-integrations/llms/llama-index-llms-ovhcloud/llama_index/llms/ovhcloud/utils.py | from llama_index.core.bridge.pydantic import BaseModel
# OVHcloud AI Endpoints supported models
# This list can be updated based on the catalog at:
# https://www.ovhcloud.com/en/public-cloud/ai-endpoints/catalog/
SUPPORTED_MODEL_SLUGS = [
# Add model slugs here as they become available
# Example format: "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/llms/llama-index-llms-ovhcloud/llama_index/llms/ovhcloud/__init__.py | llama-index-integrations/llms/llama-index-llms-ovhcloud/llama_index/llms/ovhcloud/__init__.py | from llama_index.llms.ovhcloud.base import OVHcloud
__all__ = ["OVHcloud"]
| python | 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/llms/llama-index-llms-ovhcloud/llama_index/llms/ovhcloud/base.py | llama-index-integrations/llms/llama-index-llms-ovhcloud/llama_index/llms/ovhcloud/base.py | import os
from typing import Any, Callable, Dict, List, Optional, Sequence
from llama_index.core.base.llms.types import (
ChatMessage,
LLMMetadata,
)
from llama_index.core.callbacks import CallbackManager
from llama_index.core.constants import DEFAULT_NUM_OUTPUTS, DEFAULT_TEMPERATURE
from llama_index.core.types... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-clarifai/llama_index/llms/clarifai/__init__.py | llama-index-integrations/llms/llama-index-llms-clarifai/llama_index/llms/clarifai/__init__.py | from llama_index.llms.clarifai.base import Clarifai
__all__ = ["Clarifai"]
| python | 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/llms/llama-index-llms-clarifai/llama_index/llms/clarifai/base.py | llama-index-integrations/llms/llama-index-llms-clarifai/llama_index/llms/clarifai/base.py | import os
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
)
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/llms/llama-index-llms-localai/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-localai/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/llms/llama-index-llms-localai/tests/test_llms_localai.py | llama-index-integrations/llms/llama-index-llms-localai/tests/test_llms_localai.py | from llama_index.core.base.llms.base import BaseLLM
from llama_index.llms.localai import LocalAI
def test_embedding_class():
names_of_base_classes = [b.__name__ for b in LocalAI.__mro__]
assert BaseLLM.__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/llms/llama-index-llms-localai/llama_index/llms/localai/__init__.py | llama-index-integrations/llms/llama-index-llms-localai/llama_index/llms/localai/__init__.py | from llama_index.llms.localai.base import LocalAI
__all__ = ["LocalAI"]
| python | 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/llms/llama-index-llms-localai/llama_index/llms/localai/base.py | llama-index-integrations/llms/llama-index-llms-localai/llama_index/llms/localai/base.py | """
LocalAI is a free, open source, and self-hosted OpenAI alternative.
Docs: https://localai.io/
Source: https://github.com/go-skynet/LocalAI
"""
import warnings
from types import MappingProxyType
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.core.base.llms.types import ChatMessage, LL... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | false |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-oci-genai/tests/test_oci_genai.py | llama-index-integrations/llms/llama-index-llms-oci-genai/tests/test_oci_genai.py | # Test OCI Generative AI LLM service
from unittest.mock import MagicMock
from typing import Any
import pytest
from pytest import MonkeyPatch
from llama_index.llms.oci_genai import OCIGenAI
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
MessageRole,
TextBlock,
ImageBlock... | python | 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/llms/llama-index-llms-oci-genai/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-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/llms/llama-index-llms-oci-genai/tests/test_llms_oci_genai.py | llama-index-integrations/llms/llama-index-llms-oci-genai/tests/test_llms_oci_genai.py | from unittest.mock import MagicMock
from llama_index.core.base.llms.base import BaseLLM
from llama_index.core.tools import FunctionTool
from llama_index.llms.oci_genai import OCIGenAI
def test_oci_genai_embedding_class():
names_of_base_classes = [b.__name__ for b in OCIGenAI.__mro__]
assert BaseLLM.__name__ 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/llms/llama-index-llms-oci-genai/llama_index/llms/oci_genai/utils.py | llama-index-integrations/llms/llama-index-llms-oci-genai/llama_index/llms/oci_genai/utils.py | import inspect
import json
import uuid
from abc import ABC, abstractmethod
from enum import Enum
from typing import Any, Sequence, Dict, Union, Type, Callable, Optional, List
from llama_index.core.base.llms.types import (
ChatMessage,
MessageRole,
ChatResponse,
TextBlock,
ImageBlock,
)
from llama_in... | python | MIT | dd5b31109cc8eb64411caf9fc1fa0f51e584c325 | 2026-01-04T14:39:40.052063Z | true |
run-llama/llama_index | https://github.com/run-llama/llama_index/blob/dd5b31109cc8eb64411caf9fc1fa0f51e584c325/llama-index-integrations/llms/llama-index-llms-oci-genai/llama_index/llms/oci_genai/__init__.py | llama-index-integrations/llms/llama-index-llms-oci-genai/llama_index/llms/oci_genai/__init__.py | from llama_index.llms.oci_genai.base import OCIGenAI
__all__ = ["OCIGenAI"]
| python | 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/llms/llama-index-llms-oci-genai/llama_index/llms/oci_genai/base.py | llama-index-integrations/llms/llama-index-llms-oci-genai/llama_index/llms/oci_genai/base.py | import json
from typing import Any, Callable, Dict, Optional, Sequence, List, Union, TYPE_CHECKING
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMM... | python | 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/llms/llama-index-llms-baseten/tests/test_coverage_comprehensive.py | llama-index-integrations/llms/llama-index-llms-baseten/tests/test_coverage_comprehensive.py | #!/usr/bin/env python3
"""
Comprehensive test coverage for Baseten dynamic validation functions.
This file ensures all lines in utils.py and base.py are covered.
"""
import sys
import warnings
from unittest.mock import Mock, patch
# Add the Baseten LLM integration to the path
sys.path.insert(
0,
"/Users/alexk... | python | 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/llms/llama-index-llms-baseten/tests/test_llms_baseten.py | llama-index-integrations/llms/llama-index-llms-baseten/tests/test_llms_baseten.py | from llama_index.core.base.llms.base import BaseLLM
from llama_index.llms.baseten import Baseten
def test_text_inference_embedding_class():
names_of_base_classes = [b.__name__ for b in Baseten.__mro__]
assert BaseLLM.__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/llms/llama-index-llms-baseten/tests/__init__.py | llama-index-integrations/llms/llama-index-llms-baseten/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/llms/llama-index-llms-baseten/tests/test_baseten_dynamic.py | llama-index-integrations/llms/llama-index-llms-baseten/tests/test_baseten_dynamic.py | #!/usr/bin/env python3
"""
Test script for Baseten LLM dynamic validation implementation.
This demonstrates the new dynamic model validation pattern adapted from NVIDIA.
"""
import os
import sys
# Add the Baseten LLM integration to the path
sys.path.insert(
0,
"/Users/alexker/code/llama_index/llama-index-inte... | 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.