Documentation ¶
Index ¶
- type DBClient
- func (dbClient *DBClient) Create(ctx context.Context, req *pb.ModelProviderCreateRequest) (*pb.ModelProvider, error)
- func (dbClient *DBClient) Delete(ctx context.Context, req *pb.ModelProviderDeleteRequest) (*commonpb.VoidResponse, error)
- func (dbClient *DBClient) Get(ctx context.Context, req *pb.ModelProviderGetRequest) (*pb.ModelProvider, error)
- func (dbClient *DBClient) Paging(ctx context.Context, req *pb.ModelProviderPagingRequest) (*pb.ModelProviderPagingResponse, error)
- func (dbClient *DBClient) Update(ctx context.Context, req *pb.ModelProviderUpdateRequest) (*pb.ModelProvider, error)
- type ModelProvider
- type ModelProviders
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBClient ¶
func (*DBClient) Create ¶
func (dbClient *DBClient) Create(ctx context.Context, req *pb.ModelProviderCreateRequest) (*pb.ModelProvider, error)
func (*DBClient) Delete ¶
func (dbClient *DBClient) Delete(ctx context.Context, req *pb.ModelProviderDeleteRequest) (*commonpb.VoidResponse, error)
func (*DBClient) Get ¶
func (dbClient *DBClient) Get(ctx context.Context, req *pb.ModelProviderGetRequest) (*pb.ModelProvider, error)
func (*DBClient) Paging ¶
func (dbClient *DBClient) Paging(ctx context.Context, req *pb.ModelProviderPagingRequest) (*pb.ModelProviderPagingResponse, error)
func (*DBClient) Update ¶
func (dbClient *DBClient) Update(ctx context.Context, req *pb.ModelProviderUpdateRequest) (*pb.ModelProvider, error)
type ModelProvider ¶
type ModelProvider struct { common.BaseModel Name string `gorm:"column:name;type:varchar(191)" json:"name" yaml:"name"` Desc string `gorm:"column:desc;type:varchar(1024)" json:"desc" yaml:"desc"` Type model_provider_type.ModelProviderType `gorm:"column:type;type:varchar(191)" json:"type" yaml:"type"` APIKey string `gorm:"column:api_key;type:varchar(191)" json:"aPIKey" yaml:"aPIKey"` Metadata metadata.Metadata `gorm:"column:metadata;type:mediumtext" json:"metadata" yaml:"metadata"` }
func (*ModelProvider) TableName ¶
func (*ModelProvider) TableName() string
func (*ModelProvider) ToProtobuf ¶
func (m *ModelProvider) ToProtobuf() *pb.ModelProvider
type ModelProviders ¶
type ModelProviders []*ModelProvider
func (ModelProviders) ToProtobuf ¶
func (modelProviders ModelProviders) ToProtobuf() []*pb.ModelProvider
Click to show internal directories.
Click to hide internal directories.