mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-07 04:45:44 +00:00
Rename TGI Adapter class
This commit is contained in:
parent
eee6c69f46
commit
3d660ad938
2 changed files with 5 additions and 5 deletions
|
@ -5,19 +5,19 @@
|
|||
# the root directory of this source tree.
|
||||
|
||||
from .config import TGIImplConfig
|
||||
from .tgi import InferenceEndpointAdapter, LocalTGIAdapter
|
||||
from .tgi import InferenceEndpointAdapter, TGIAdapter
|
||||
|
||||
|
||||
async def get_adapter_impl(config: TGIImplConfig, _deps):
|
||||
assert isinstance(config, TGIImplConfig), f"Unexpected config type: {type(config)}"
|
||||
|
||||
if config.is_local_tgi():
|
||||
impl = LocalTGIAdapter(config)
|
||||
impl = TGIAdapter(config)
|
||||
elif config.is_inference_endpoint():
|
||||
impl = InferenceEndpointAdapter(config)
|
||||
else:
|
||||
raise ValueError(
|
||||
"Invalid configuration. Specify either a local URL or Inference Endpoint details."
|
||||
"Invalid configuration. Specify either an URL or HF Inference Endpoint details (namespace and endpoint name)."
|
||||
)
|
||||
|
||||
await impl.initialize()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue