mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-30 16:53:12 +00:00
Core implementation of postgresql dataset for llama stack Signed-off-by: Josh Salomon <jsalomon@redhat.com>
15 lines
543 B
Python
15 lines
543 B
Python
# 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.
|
|
|
|
|
|
def get_provider_type(module: str) -> str:
|
|
parts = module.split(".")
|
|
if parts[0] != "llama_stack" or parts[1] != "providers":
|
|
raise ValueError(f"Invalid module name <{module}>")
|
|
if parts[2] == "inline" or parts[2] == "remote":
|
|
return parts[2]
|
|
else:
|
|
raise ValueError(f"Invalid module name <{module}>")
|