Documentation ¶
Index ¶
- Variables
- func CheckModelService(ctx context.Context, c client.Client, input generated.CreateModelServiceInput) (*generated.ModelService, error)
- func CreateModelService(ctx context.Context, c client.Client, input generated.CreateModelServiceInput) (*generated.ModelService, error)
- func DeleteModelService(ctx context.Context, c client.Client, input *generated.DeleteCommonInput) (*string, error)
- func Embedder2ModelService(embedder *generated.Embedder) *generated.ModelService
- func LLM2ModelService(llm *generated.Llm) *generated.ModelService
- func ListModelServices(ctx context.Context, c client.Client, input *generated.ListModelServiceInput) (*generated.PaginatedResult, error)
- func ReadModelService(ctx context.Context, c client.Client, name string, namespace string) (*generated.ModelService, error)
- func UpdateModelService(ctx context.Context, c client.Client, input *generated.UpdateModelServiceInput) (*generated.ModelService, error)
- func Worker2ModelService(worker *generated.Worker) *generated.ModelService
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckModelService ¶
func CheckModelService(ctx context.Context, c client.Client, input generated.CreateModelServiceInput) (*generated.ModelService, error)
func CreateModelService ¶
func CreateModelService(ctx context.Context, c client.Client, input generated.CreateModelServiceInput) (*generated.ModelService, error)
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 ¶
func ListModelServices(ctx context.Context, c client.Client, input *generated.ListModelServiceInput) (*generated.PaginatedResult, error)
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 ¶
func UpdateModelService(ctx context.Context, c client.Client, input *generated.UpdateModelServiceInput) (*generated.ModelService, error)
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.