Documentation ¶
Index ¶
- Constants
- Variables
- func GetDefaultRerankModel(ctx context.Context) (*arcadiav1alpha1.TypedObjectReference, error)
- func GetEmbedder(ctx context.Context) (*arcadiav1alpha1.TypedObjectReference, error)
- func GetRelationalDatasource(ctx context.Context) (*arcadiav1alpha1.Datasource, error)
- func GetSystemDatasource(ctx context.Context) (*arcadiav1alpha1.Datasource, error)
- func GetSystemDatasourceOSS(ctx context.Context) (*datasource.OSS, error)
- func GetSystemEmbeddingSuite(ctx context.Context) (*arcadiav1alpha1.Embedder, *arcadiav1alpha1.VectorStore, error)
- func GetVectorStore(ctx context.Context) (*arcadiav1alpha1.TypedObjectReference, error)
- func InitSystemClient(cli client.Client)
- type Category
- type Config
- type EmbeddingSuite
- type GPTsConfig
- type Gateway
- type RayCluster
- type Streamlit
Constants ¶
const ( EnvConfigKey = "DEFAULT_CONFIG" EnvConfigDefaultValue = "arcadia-config" )
Variables ¶
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") ErrNoConfigEmbedder = fmt.Errorf("config Embedder 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") ErrNoConfigRayClusters = fmt.Errorf("config RayClusters in comfigmap is not found") ErrNoConfigRerank = fmt.Errorf("config rerankDefaultEndpoint in comfigmap is not found") ErrSystemCliNotFound = fmt.Errorf("systemCli is not found") )
var ( ErrNoGPTsConfig = fmt.Errorf("gpts config in configmap is empty") ErrNoGPTsConfigCategory = fmt.Errorf("gpts config Categories in comfigmap is not found") )
Functions ¶
func GetDefaultRerankModel ¶ added in v0.2.2
func GetDefaultRerankModel(ctx context.Context) (*arcadiav1alpha1.TypedObjectReference, error)
GetDefaultRerankModel gets the default reranking model which is recommended by kubeagi
func GetEmbedder ¶ added in v0.2.0
func GetEmbedder(ctx context.Context) (*arcadiav1alpha1.TypedObjectReference, error)
GetEmbedder get the default embedder from config
func GetRelationalDatasource ¶ added in v0.2.0
func GetRelationalDatasource(ctx context.Context) (*arcadiav1alpha1.Datasource, error)
func GetSystemDatasource ¶
func GetSystemDatasource(ctx context.Context) (*arcadiav1alpha1.Datasource, error)
GetSystemDatasource get the system datasource of kubeagi
func GetSystemDatasourceOSS ¶ added in v0.2.2
func GetSystemDatasourceOSS(ctx context.Context) (*datasource.OSS, error)
func GetSystemEmbeddingSuite ¶ added in v0.2.2
func GetSystemEmbeddingSuite(ctx context.Context) (*arcadiav1alpha1.Embedder, *arcadiav1alpha1.VectorStore, error)
GetSystemEmbeddingSuite returns the embedder and vectorstore which are built-in in system config Embedder and vectorstore are both required when generating a new embedding.That's why we call it a `EmbeddingSuit`
func GetVectorStore ¶
func GetVectorStore(ctx context.Context) (*arcadiav1alpha1.TypedObjectReference, error)
GetVectorStore get the default vector store from config
func InitSystemClient ¶ added in v0.2.2
Types ¶
type Category ¶ added in v0.2.2
type Category struct { ID string `json:"id"` Name string `json:"name"` NameEn string `json:"nameEn,omitempty"` }
Category in gpt store
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"` // RelationalDatasource specifies the built-in datasource(common:postgres) for Arcadia to host relational data RelationalDatasource arcadiav1alpha1.TypedObjectReference `json:"relationalDatasource,omitempty"` // Gateway to access LLM api services Gateway *Gateway `json:"gateway,omitempty"` // EmbeddingSuite here represents the system embedding service provided by the system EmbeddingSuite // Resource pool managed by Ray cluster RayClusters []RayCluster `json:"rayClusters,omitempty"` // the default rerank model Rerank *arcadiav1alpha1.TypedObjectReference `json:"rerank,omitempty"` // Streamlit to get the Streamlit configuration // Deprecated: this field no longer maintained Streamlit *Streamlit `json:"streamlit,omitempty"` }
Config defines the configuration for the Arcadia controller
type EmbeddingSuite ¶ added in v0.2.2
type EmbeddingSuite struct { // Embedder specifies the default embedder for Arcadia to generate embeddings Embedder *arcadiav1alpha1.TypedObjectReference `json:"embedder,omitempty"` // VectorStore to access VectorStore api services VectorStore *arcadiav1alpha1.TypedObjectReference `json:"vectorStore,omitempty"` }
EmbeddingSuite contains everything required to provide embedding service
type GPTsConfig ¶ added in v0.2.2
type GPTsConfig struct { // URL is the url of gpt store URL string `json:"url,omitempty"` // PublicNamespace is the namespace which all gpt-releated resources are public PublicNamespace string `json:"public_namespace,omitempty"` Categories []Category `json:"categories,omitempty"` }
GPTsConfig is the configurations for GPT Store
func GetGPTsConfig ¶ added in v0.2.2
GetGPTsConfig gets the gpts configurations
type Gateway ¶
type Gateway struct { // ExternalAPIServer is the api(LLM/Embedding) server address that can be accessed from internet ExternalAPIServer string `json:"externalApiServer,omitempty"` // APIServer is api(LLM/Embedding) server which can be accessed within platform APIServer string `json:"apiServer,omitempty"` // Controller is the server address which is responsible for llm/embedding service registration Controller string `json:"controller,omitempty"` }
Gateway defines the way to access llm apis host by Arcadia
type RayCluster ¶ added in v0.2.0
type RayCluster struct { // Name of this ray cluster Name string `json:"name,omitempty"` // Address of ray head address HeadAddress string `json:"headAddress,omitempty"` // Management dashboard of ray cluster, optional to configure it using ingress DashboardHost string `json:"dashboardHost,omitempty"` // Overwrite the python version in the woker PythonVersion string `json:"pythonVersion,omitempty"` // Ray cluster version RayVersion string `json:"rayVersion,omitempty"` }
RayCluster defines configuration of existing ray cluster that manage GPU resources
func DefaultRayCluster ¶ added in v0.2.2
func DefaultRayCluster() RayCluster
DefaultRayCluster which can be used for vllm worker as local ray cluster which can only utilize single node gpus
func GetRayClusters ¶ added in v0.2.0
func GetRayClusters(ctx context.Context) ([]RayCluster, error)
Get the ray cluster that can be used a resource pool
func (RayCluster) GetPythonVersion ¶ added in v0.2.2
func (rayCluster RayCluster) GetPythonVersion() string
GetPythonVersion in ray cluster
func (RayCluster) GetRayVersion ¶ added in v0.2.2
func (rayCluster RayCluster) GetRayVersion() string
GetRayVersion in ray cluster
func (RayCluster) String ¶ added in v0.2.2
func (rayCluster RayCluster) String() string
String format raycluster into string