modelservice

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongAuthFormat  = errors.New("wrong auth format, auth[\"apikey\"] should be string")
	ErrNoAuthProvided   = errors.New("no auth provided")
	ErrNoAPIKeyProvided = errors.New("no apiKey provided")
)

Functions

func CreateModelService

CreateModelService creates a 3rd_party model service If serviceType is llm,embedding,then a LLM and a Embedder will be created - Wrap all elements into *generated.ModelService

func DeleteModelService

func DeleteModelService(ctx context.Context, c client.Client, input *generated.DeleteCommonInput) (*string, error)

DeleteModelService deletes a 3rd_party model service

func Embedder2ModelService

func Embedder2ModelService(embedder *generated.Embedder) *generated.ModelService

Embedder2ModelService convert unstructured `CR Embedder` to graphql model `ModelService`

func LLM2ModelService

func LLM2ModelService(llm *generated.Llm) *generated.ModelService

LLM2ModelService convert unstructured `CR LLM` to graphql model `ModelService`

func ListModelServices

ListModelServices based on input

func ReadModelService

func ReadModelService(ctx context.Context, c client.Client, name string, namespace string) (*generated.ModelService, error)

ReadModelService get a 3rd_party model service

func UpdateModelService

UpdateModelService updates a 3rd_party model service. Considering mdoel_service wraps two resources (LLM&Embedder) which is hard to do `Update`. So we can have the following workaround(Update == delete + create): 1. delete model_service 2. create model_service

func Worker2ModelService added in v0.2.0

func Worker2ModelService(worker *generated.Worker) *generated.ModelService

Types

This section is empty.

Jump to

Keyboard shortcuts

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