mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 03:23:53 +00:00
Initial commit for postgresql dataset provider
Core implementation of postgresql dataset for llama stack Signed-off-by: Josh Salomon <jsalomon@redhat.com>
This commit is contained in:
parent
bdfe7fee92
commit
8e3b579df2
8 changed files with 512 additions and 0 deletions
15
llama_stack/providers/utils/common/provider_utils.py
Normal file
15
llama_stack/providers/utils/common/provider_utils.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# 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}>")
|
||||
Loading…
Add table
Add a link
Reference in a new issue