forked from phoenix-oss/llama-stack-mirror
init lmstudio inference structure
This commit is contained in:
parent
5d88a2fff5
commit
a5a573ad76
3 changed files with 94 additions and 0 deletions
22
llama_stack/providers/remote/inference/lmstudio/__init__.py
Normal file
22
llama_stack/providers/remote/inference/lmstudio/__init__.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
from llama_stack.apis.inference import Inference
|
||||
|
||||
from .config import LMSTUDIOConfig
|
||||
|
||||
|
||||
async def get_adapter_impl(config: LMSTUDIOConfig, _deps) -> Inference:
|
||||
# import dynamically so `llama stack build` does not fail due to missing dependencies
|
||||
from .lmstudio import LMSTUDIOInferenceAdapter
|
||||
|
||||
if not isinstance(config, LMSTUDIOConfig):
|
||||
raise RuntimeError(f"Unexpected config type: {type(config)}")
|
||||
adapter = LMSTUDIOInferenceAdapter(config)
|
||||
return adapter
|
||||
|
||||
|
||||
__all__ = ["get_adapter_impl", "LMSTUDIOConfig"]
|
Loading…
Add table
Add a link
Reference in a new issue