mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-05 10:23:44 +00:00
feat: refactor llama-stack-api structure
move llama_stack_api.apis... to top level llama_stack_api. merge provider datatypes and the existing apis.datatypes into a common llama_stack_api.datatypes update all usages of these packages throughout LLS Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
parent
d6b915ce0a
commit
b7480e9c88
296 changed files with 906 additions and 1109 deletions
|
|
@ -9,7 +9,7 @@ from unittest.mock import patch
|
|||
|
||||
import pytest
|
||||
import yaml
|
||||
from llama_stack_api.providers.datatypes import ProviderSpec
|
||||
from llama_stack_api.datatypes import ProviderSpec
|
||||
from pydantic import BaseModel, Field, ValidationError
|
||||
|
||||
from llama_stack.core.datatypes import Api, Provider, StackRunConfig
|
||||
|
|
@ -312,7 +312,7 @@ pip_packages:
|
|||
"""Test loading an external provider from a module (success path)."""
|
||||
from types import SimpleNamespace
|
||||
|
||||
from llama_stack_api.providers.datatypes import Api, ProviderSpec
|
||||
from llama_stack_api.datatypes import Api, ProviderSpec
|
||||
|
||||
# Simulate a provider module with get_provider_spec
|
||||
fake_spec = ProviderSpec(
|
||||
|
|
@ -395,7 +395,7 @@ pip_packages:
|
|||
|
||||
def test_external_provider_from_module_building(self, mock_providers):
|
||||
"""Test loading an external provider from a module during build (building=True, partial spec)."""
|
||||
from llama_stack_api.providers.datatypes import Api
|
||||
from llama_stack_api.datatypes import Api
|
||||
|
||||
from llama_stack.core.datatypes import BuildConfig, BuildProvider, DistributionSpec
|
||||
|
||||
|
|
@ -457,7 +457,7 @@ class TestGetExternalProvidersFromModule:
|
|||
"""Test provider with module containing version spec (e.g., package==1.0.0)."""
|
||||
from types import SimpleNamespace
|
||||
|
||||
from llama_stack_api.providers.datatypes import ProviderSpec
|
||||
from llama_stack_api.datatypes import ProviderSpec
|
||||
|
||||
from llama_stack.core.distribution import get_external_providers_from_module
|
||||
|
||||
|
|
@ -595,7 +595,7 @@ class TestGetExternalProvidersFromModule:
|
|||
"""Test when get_provider_spec returns a list of specs."""
|
||||
from types import SimpleNamespace
|
||||
|
||||
from llama_stack_api.providers.datatypes import ProviderSpec
|
||||
from llama_stack_api.datatypes import ProviderSpec
|
||||
|
||||
from llama_stack.core.distribution import get_external_providers_from_module
|
||||
|
||||
|
|
@ -644,7 +644,7 @@ class TestGetExternalProvidersFromModule:
|
|||
"""Test that list return filters specs by provider_type."""
|
||||
from types import SimpleNamespace
|
||||
|
||||
from llama_stack_api.providers.datatypes import ProviderSpec
|
||||
from llama_stack_api.datatypes import ProviderSpec
|
||||
|
||||
from llama_stack.core.distribution import get_external_providers_from_module
|
||||
|
||||
|
|
@ -693,7 +693,7 @@ class TestGetExternalProvidersFromModule:
|
|||
"""Test that list return adds multiple different provider_types when config requests them."""
|
||||
from types import SimpleNamespace
|
||||
|
||||
from llama_stack_api.providers.datatypes import ProviderSpec
|
||||
from llama_stack_api.datatypes import ProviderSpec
|
||||
|
||||
from llama_stack.core.distribution import get_external_providers_from_module
|
||||
|
||||
|
|
@ -833,7 +833,7 @@ class TestGetExternalProvidersFromModule:
|
|||
"""Test multiple APIs with providers."""
|
||||
from types import SimpleNamespace
|
||||
|
||||
from llama_stack_api.providers.datatypes import ProviderSpec
|
||||
from llama_stack_api.datatypes import ProviderSpec
|
||||
|
||||
from llama_stack.core.distribution import get_external_providers_from_module
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue