config

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvConfigKey          = "DEFAULT_CONFIG"
	EnvConfigDefaultValue = "arcadia-config"
)

Variables

View Source
var (
	ErrNoConfigEnv         = fmt.Errorf("env:%s is not found", EnvConfigKey)
	ErrNoConfig            = fmt.Errorf("config in configmap is empty")
	ErrNoConfigGateway     = fmt.Errorf("config Gateway in configmap is not found")
	ErrNoConfigMinIO       = fmt.Errorf("config MinIO in comfigmap is not found")
	ErrNoConfigVectorstore = fmt.Errorf("config Vectorstore in comfigmap is not found")
	ErrNoConfigStreamlit   = fmt.Errorf("config Streamlit in comfigmap is not found")
)

Functions

Types

type Config

type Config struct {
	// SystemDatasource specifies the built-in datasource for Arcadia to host data files and model files
	SystemDatasource arcadiav1alpha1.TypedObjectReference `json:"systemDatasource,omitempty"`

	// Gateway to access LLM api services
	Gateway *Gateway `json:"gateway,omitempty"`

	// VectorStore to access VectorStore api services
	VectorStore *arcadiav1alpha1.TypedObjectReference `json:"vectorStore,omitempty"`

	// Streamlit to get the configuration
	Streamlit *Streamlit `json:"streamlit,omitempty"`
}

Config defines the configuration for the Arcadia controller

func GetConfig

func GetConfig(ctx context.Context, c client.Client, cli dynamic.Interface) (config *Config, err error)

type Gateway

type Gateway struct {
	ExternalAPIServer string `json:"externalApiServer,omitempty"`
	APIServer         string `json:"apiServer,omitempty"`
	Controller        string `json:"controller,omitempty"`
}

Gateway defines the way to access llm apis host by Arcadia

func GetGateway

func GetGateway(ctx context.Context, c client.Client, cli dynamic.Interface) (*Gateway, error)

type Streamlit

type Streamlit struct {
	Image            string `json:"image"`
	IngressClassName string `json:"ingressClassName"`
	Host             string `json:"host"`
	ContextPath      string `json:"contextPath"`
}

Streamlit defines the configuration of streamlit app

func GetStreamlit

func GetStreamlit(ctx context.Context, c client.Client) (*Streamlit, error)

Get the configuration of streamlit tool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL