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:
Josh Salomon 2025-03-26 12:15:40 +02:00
parent bdfe7fee92
commit 8e3b579df2
8 changed files with 512 additions and 0 deletions

View 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}>")