mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
Make Fireworks and Together into the Adapter format
This commit is contained in:
parent
a23a6ab95b
commit
f1244f6d9e
10 changed files with 56 additions and 83 deletions
|
@ -8,7 +8,7 @@ import asyncio
|
|||
import importlib
|
||||
from typing import Any, Dict
|
||||
|
||||
from .datatypes import ProviderSpec, RemoteProviderConfig, RemoteProviderSpec
|
||||
from .datatypes import ProviderSpec, RemoteProviderSpec
|
||||
|
||||
|
||||
def instantiate_class_type(fully_qualified_name):
|
||||
|
@ -28,10 +28,6 @@ def instantiate_provider(
|
|||
config_type = instantiate_class_type(provider_spec.config_class)
|
||||
if isinstance(provider_spec, RemoteProviderSpec):
|
||||
if provider_spec.adapter:
|
||||
if not issubclass(config_type, RemoteProviderConfig):
|
||||
raise ValueError(
|
||||
f"Config class {provider_spec.config_class} does not inherit from RemoteProviderConfig"
|
||||
)
|
||||
method = "get_adapter_impl"
|
||||
else:
|
||||
method = "get_client_impl"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue