mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-03 19:57:35 +00:00
12 lines
395 B
Python
12 lines
395 B
Python
from .api.config import ImplType, ModelInferenceConfig
|
|
|
|
|
|
async def get_inference_api_instance(config: ModelInferenceConfig):
|
|
if config.impl_config.impl_type == ImplType.inline.value:
|
|
from .inference import ModelInferenceImpl
|
|
|
|
return ModelInferenceImpl(config.impl_config)
|
|
|
|
from .client import ModelInferenceClient
|
|
|
|
return ModelInferenceClient(config.impl_config.url)
|