model_service

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModelService_ImportModel_FullMethodName       = "/model_service.ModelService/ImportModel"
	ModelService_UpdateModel_FullMethodName       = "/model_service.ModelService/UpdateModel"
	ModelService_DeleteModel_FullMethodName       = "/model_service.ModelService/DeleteModel"
	ModelService_GetModel_FullMethodName          = "/model_service.ModelService/GetModel"
	ModelService_ListModels_FullMethodName        = "/model_service.ModelService/ListModels"
	ModelService_ChangeModelStatus_FullMethodName = "/model_service.ModelService/ChangeModelStatus"
	ModelService_GetModelById_FullMethodName      = "/model_service.ModelService/GetModelById"
	ModelService_ListTypeModels_FullMethodName    = "/model_service.ModelService/ListTypeModels"
	ModelService_GetModelByIds_FullMethodName     = "/model_service.ModelService/GetModelByIds"
)

Variables

View Source
var File_proto_model_service_model_service_proto protoreflect.FileDescriptor
View Source
var ModelService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "model_service.ModelService",
	HandlerType: (*ModelServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ImportModel",
			Handler:    _ModelService_ImportModel_Handler,
		},
		{
			MethodName: "UpdateModel",
			Handler:    _ModelService_UpdateModel_Handler,
		},
		{
			MethodName: "DeleteModel",
			Handler:    _ModelService_DeleteModel_Handler,
		},
		{
			MethodName: "GetModel",
			Handler:    _ModelService_GetModel_Handler,
		},
		{
			MethodName: "ListModels",
			Handler:    _ModelService_ListModels_Handler,
		},
		{
			MethodName: "ChangeModelStatus",
			Handler:    _ModelService_ChangeModelStatus_Handler,
		},
		{
			MethodName: "GetModelById",
			Handler:    _ModelService_GetModelById_Handler,
		},
		{
			MethodName: "ListTypeModels",
			Handler:    _ModelService_ListTypeModels_Handler,
		},
		{
			MethodName: "GetModelByIds",
			Handler:    _ModelService_GetModelByIds_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/model-service/model-service.proto",
}

ModelService_ServiceDesc is the grpc.ServiceDesc for ModelService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterModelServiceServer

func RegisterModelServiceServer(s grpc.ServiceRegistrar, srv ModelServiceServer)

Types

type DeleteModelReq

type DeleteModelReq struct {
	UserId  string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
	OrgId   string `protobuf:"bytes,2,opt,name=orgId,proto3" json:"orgId,omitempty"`
	ModelId string `protobuf:"bytes,3,opt,name=modelId,proto3" json:"modelId,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteModelReq) Descriptor deprecated

func (*DeleteModelReq) Descriptor() ([]byte, []int)

Deprecated: Use DeleteModelReq.ProtoReflect.Descriptor instead.

func (*DeleteModelReq) GetModelId added in v0.2.1

func (x *DeleteModelReq) GetModelId() string

func (*DeleteModelReq) GetOrgId

func (x *DeleteModelReq) GetOrgId() string

func (*DeleteModelReq) GetUserId

func (x *DeleteModelReq) GetUserId() string

func (*DeleteModelReq) ProtoMessage

func (*DeleteModelReq) ProtoMessage()

func (*DeleteModelReq) ProtoReflect

func (x *DeleteModelReq) ProtoReflect() protoreflect.Message

func (*DeleteModelReq) Reset

func (x *DeleteModelReq) Reset()

func (*DeleteModelReq) String

func (x *DeleteModelReq) String() string

type GetModelByIdReq

type GetModelByIdReq struct {
	ModelId string `protobuf:"bytes,1,opt,name=modelId,proto3" json:"modelId,omitempty"`
	UserId  string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`
	OrgId   string `protobuf:"bytes,3,opt,name=orgId,proto3" json:"orgId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetModelByIdReq) Descriptor deprecated

func (*GetModelByIdReq) Descriptor() ([]byte, []int)

Deprecated: Use GetModelByIdReq.ProtoReflect.Descriptor instead.

func (*GetModelByIdReq) GetModelId

func (x *GetModelByIdReq) GetModelId() string

func (*GetModelByIdReq) GetOrgId

func (x *GetModelByIdReq) GetOrgId() string

func (*GetModelByIdReq) GetUserId

func (x *GetModelByIdReq) GetUserId() string

func (*GetModelByIdReq) ProtoMessage

func (*GetModelByIdReq) ProtoMessage()

func (*GetModelByIdReq) ProtoReflect

func (x *GetModelByIdReq) ProtoReflect() protoreflect.Message

func (*GetModelByIdReq) Reset

func (x *GetModelByIdReq) Reset()

func (*GetModelByIdReq) String

func (x *GetModelByIdReq) String() string

type GetModelByIdsReq

type GetModelByIdsReq struct {
	UserId   string   `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
	OrgId    string   `protobuf:"bytes,2,opt,name=orgId,proto3" json:"orgId,omitempty"`
	ModelIds []string `protobuf:"bytes,3,rep,name=modelIds,proto3" json:"modelIds,omitempty"`
	// contains filtered or unexported fields
}

func (*GetModelByIdsReq) Descriptor deprecated

func (*GetModelByIdsReq) Descriptor() ([]byte, []int)

Deprecated: Use GetModelByIdsReq.ProtoReflect.Descriptor instead.

func (*GetModelByIdsReq) GetModelIds

func (x *GetModelByIdsReq) GetModelIds() []string

func (*GetModelByIdsReq) GetOrgId

func (x *GetModelByIdsReq) GetOrgId() string

func (*GetModelByIdsReq) GetUserId

func (x *GetModelByIdsReq) GetUserId() string

func (*GetModelByIdsReq) ProtoMessage

func (*GetModelByIdsReq) ProtoMessage()

func (*GetModelByIdsReq) ProtoReflect

func (x *GetModelByIdsReq) ProtoReflect() protoreflect.Message

func (*GetModelByIdsReq) Reset

func (x *GetModelByIdsReq) Reset()

func (*GetModelByIdsReq) String

func (x *GetModelByIdsReq) String() string

type GetModelReq

type GetModelReq struct {
	UserId  string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
	OrgId   string `protobuf:"bytes,2,opt,name=orgId,proto3" json:"orgId,omitempty"`
	ModelId string `protobuf:"bytes,3,opt,name=modelId,proto3" json:"modelId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetModelReq) Descriptor deprecated

func (*GetModelReq) Descriptor() ([]byte, []int)

Deprecated: Use GetModelReq.ProtoReflect.Descriptor instead.

func (*GetModelReq) GetModelId added in v0.2.1

func (x *GetModelReq) GetModelId() string

func (*GetModelReq) GetOrgId

func (x *GetModelReq) GetOrgId() string

func (*GetModelReq) GetUserId

func (x *GetModelReq) GetUserId() string

func (*GetModelReq) ProtoMessage

func (*GetModelReq) ProtoMessage()

func (*GetModelReq) ProtoReflect

func (x *GetModelReq) ProtoReflect() protoreflect.Message

func (*GetModelReq) Reset

func (x *GetModelReq) Reset()

func (*GetModelReq) String

func (x *GetModelReq) String() string

type ListModelsReq

type ListModelsReq struct {
	ModelType   string `protobuf:"bytes,1,opt,name=modelType,proto3" json:"modelType,omitempty"` // 模型类型
	Provider    string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`   // 模型供应商
	IsActive    bool   `protobuf:"varint,3,opt,name=isActive,proto3" json:"isActive,omitempty"`  // 启用状态(true: 启用,false: 禁用)
	UserId      string `protobuf:"bytes,4,opt,name=userId,proto3" json:"userId,omitempty"`
	OrgId       string `protobuf:"bytes,5,opt,name=orgId,proto3" json:"orgId,omitempty"`
	DisplayName string `protobuf:"bytes,6,opt,name=displayName,proto3" json:"displayName,omitempty"` // 模型显示名称
	// contains filtered or unexported fields
}

func (*ListModelsReq) Descriptor deprecated

func (*ListModelsReq) Descriptor() ([]byte, []int)

Deprecated: Use ListModelsReq.ProtoReflect.Descriptor instead.

func (*ListModelsReq) GetDisplayName

func (x *ListModelsReq) GetDisplayName() string

func (*ListModelsReq) GetIsActive

func (x *ListModelsReq) GetIsActive() bool

func (*ListModelsReq) GetModelType

func (x *ListModelsReq) GetModelType() string

func (*ListModelsReq) GetOrgId

func (x *ListModelsReq) GetOrgId() string

func (*ListModelsReq) GetProvider

func (x *ListModelsReq) GetProvider() string

func (*ListModelsReq) GetUserId

func (x *ListModelsReq) GetUserId() string

func (*ListModelsReq) ProtoMessage

func (*ListModelsReq) ProtoMessage()

func (*ListModelsReq) ProtoReflect

func (x *ListModelsReq) ProtoReflect() protoreflect.Message

func (*ListModelsReq) Reset

func (x *ListModelsReq) Reset()

func (*ListModelsReq) String

func (x *ListModelsReq) String() string

type ListTypeModelsReq

type ListTypeModelsReq struct {
	UserId    string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
	OrgId     string `protobuf:"bytes,2,opt,name=orgId,proto3" json:"orgId,omitempty"`
	ModelType string `protobuf:"bytes,3,opt,name=modelType,proto3" json:"modelType,omitempty"` // 模型类型
	// contains filtered or unexported fields
}

func (*ListTypeModelsReq) Descriptor deprecated

func (*ListTypeModelsReq) Descriptor() ([]byte, []int)

Deprecated: Use ListTypeModelsReq.ProtoReflect.Descriptor instead.

func (*ListTypeModelsReq) GetModelType

func (x *ListTypeModelsReq) GetModelType() string

func (*ListTypeModelsReq) GetOrgId

func (x *ListTypeModelsReq) GetOrgId() string

func (*ListTypeModelsReq) GetUserId

func (x *ListTypeModelsReq) GetUserId() string

func (*ListTypeModelsReq) ProtoMessage

func (*ListTypeModelsReq) ProtoMessage()

func (*ListTypeModelsReq) ProtoReflect

func (x *ListTypeModelsReq) ProtoReflect() protoreflect.Message

func (*ListTypeModelsReq) Reset

func (x *ListTypeModelsReq) Reset()

func (*ListTypeModelsReq) String

func (x *ListTypeModelsReq) String() string

type ModelInfo

type ModelInfo struct {
	UserId         string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
	OrgId          string `protobuf:"bytes,2,opt,name=orgId,proto3" json:"orgId,omitempty"`
	ModelId        string `protobuf:"bytes,3,opt,name=modelId,proto3" json:"modelId,omitempty"`
	Provider       string `protobuf:"bytes,4,opt,name=provider,proto3" json:"provider,omitempty"`           // 模型供应商
	ModelType      string `protobuf:"bytes,5,opt,name=modelType,proto3" json:"modelType,omitempty"`         // 模型类型
	Model          string `protobuf:"bytes,6,opt,name=model,proto3" json:"model,omitempty"`                 // 模型名称
	DisplayName    string `protobuf:"bytes,7,opt,name=displayName,proto3" json:"displayName,omitempty"`     // 模型显示名称
	ModelIconPath  string `protobuf:"bytes,8,opt,name=modelIconPath,proto3" json:"modelIconPath,omitempty"` // 模型图标路径
	PublishDate    string `protobuf:"bytes,9,opt,name=publishDate,proto3" json:"publishDate,omitempty"`     // 模型发布时间
	IsActive       bool   `protobuf:"varint,10,opt,name=isActive,proto3" json:"isActive,omitempty"`         // 启用状态(true: 启用,false: 禁用)
	ProviderConfig string `protobuf:"bytes,11,opt,name=providerConfig,proto3" json:"providerConfig,omitempty"`
	CreatedAt      int64  `protobuf:"varint,12,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	UpdatedAt      int64  `protobuf:"varint,13,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	ModelDesc      string `protobuf:"bytes,14,opt,name=modelDesc,proto3" json:"modelDesc,omitempty"`
	// contains filtered or unexported fields
}

func (*ModelInfo) Descriptor deprecated

func (*ModelInfo) Descriptor() ([]byte, []int)

Deprecated: Use ModelInfo.ProtoReflect.Descriptor instead.

func (*ModelInfo) GetCreatedAt

func (x *ModelInfo) GetCreatedAt() int64

func (*ModelInfo) GetDisplayName

func (x *ModelInfo) GetDisplayName() string

func (*ModelInfo) GetIsActive

func (x *ModelInfo) GetIsActive() bool

func (*ModelInfo) GetModel

func (x *ModelInfo) GetModel() string

func (*ModelInfo) GetModelDesc added in v0.2.3

func (x *ModelInfo) GetModelDesc() string

func (*ModelInfo) GetModelIconPath

func (x *ModelInfo) GetModelIconPath() string

func (*ModelInfo) GetModelId

func (x *ModelInfo) GetModelId() string

func (*ModelInfo) GetModelType

func (x *ModelInfo) GetModelType() string

func (*ModelInfo) GetOrgId

func (x *ModelInfo) GetOrgId() string

func (*ModelInfo) GetProvider

func (x *ModelInfo) GetProvider() string

func (*ModelInfo) GetProviderConfig

func (x *ModelInfo) GetProviderConfig() string

func (*ModelInfo) GetPublishDate

func (x *ModelInfo) GetPublishDate() string

func (*ModelInfo) GetUpdatedAt

func (x *ModelInfo) GetUpdatedAt() int64

func (*ModelInfo) GetUserId

func (x *ModelInfo) GetUserId() string

func (*ModelInfo) ProtoMessage

func (*ModelInfo) ProtoMessage()

func (*ModelInfo) ProtoReflect

func (x *ModelInfo) ProtoReflect() protoreflect.Message

func (*ModelInfo) Reset

func (x *ModelInfo) Reset()

func (*ModelInfo) String

func (x *ModelInfo) String() string

type ModelInfos

type ModelInfos struct {
	Models []*ModelInfo `protobuf:"bytes,1,rep,name=models,proto3" json:"models,omitempty"`
	Total  int64        `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*ModelInfos) Descriptor deprecated

func (*ModelInfos) Descriptor() ([]byte, []int)

Deprecated: Use ModelInfos.ProtoReflect.Descriptor instead.

func (*ModelInfos) GetModels

func (x *ModelInfos) GetModels() []*ModelInfo

func (*ModelInfos) GetTotal

func (x *ModelInfos) GetTotal() int64

func (*ModelInfos) ProtoMessage

func (*ModelInfos) ProtoMessage()

func (*ModelInfos) ProtoReflect

func (x *ModelInfos) ProtoReflect() protoreflect.Message

func (*ModelInfos) Reset

func (x *ModelInfos) Reset()

func (*ModelInfos) String

func (x *ModelInfos) String() string

type ModelServiceClient

type ModelServiceClient interface {
	// 模型导入(默认启用
	ImportModel(ctx context.Context, in *ModelInfo, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// 导入模型更新
	UpdateModel(ctx context.Context, in *ModelInfo, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// 导入模型删除
	DeleteModel(ctx context.Context, in *DeleteModelReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ‌查询单个模型‌
	GetModel(ctx context.Context, in *GetModelReq, opts ...grpc.CallOption) (*ModelInfo, error)
	// 导入模型列表展示
	ListModels(ctx context.Context, in *ListModelsReq, opts ...grpc.CallOption) (*ModelInfos, error)
	// 模型启用/关闭
	ChangeModelStatus(ctx context.Context, in *ModelStatusReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// 根据模型ID查询
	GetModelById(ctx context.Context, in *GetModelByIdReq, opts ...grpc.CallOption) (*ModelInfo, error)
	// llm/rerank/embedding模型列表展示
	ListTypeModels(ctx context.Context, in *ListTypeModelsReq, opts ...grpc.CallOption) (*ModelInfos, error)
	// 根据模型ID列表查询
	GetModelByIds(ctx context.Context, in *GetModelByIdsReq, opts ...grpc.CallOption) (*ModelInfos, error)
}

ModelServiceClient is the client API for ModelService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ModelServiceServer

type ModelServiceServer interface {
	// 模型导入(默认启用
	ImportModel(context.Context, *ModelInfo) (*emptypb.Empty, error)
	// 导入模型更新
	UpdateModel(context.Context, *ModelInfo) (*emptypb.Empty, error)
	// 导入模型删除
	DeleteModel(context.Context, *DeleteModelReq) (*emptypb.Empty, error)
	// ‌查询单个模型‌
	GetModel(context.Context, *GetModelReq) (*ModelInfo, error)
	// 导入模型列表展示
	ListModels(context.Context, *ListModelsReq) (*ModelInfos, error)
	// 模型启用/关闭
	ChangeModelStatus(context.Context, *ModelStatusReq) (*emptypb.Empty, error)
	// 根据模型ID查询
	GetModelById(context.Context, *GetModelByIdReq) (*ModelInfo, error)
	// llm/rerank/embedding模型列表展示
	ListTypeModels(context.Context, *ListTypeModelsReq) (*ModelInfos, error)
	// 根据模型ID列表查询
	GetModelByIds(context.Context, *GetModelByIdsReq) (*ModelInfos, error)
	// contains filtered or unexported methods
}

ModelServiceServer is the server API for ModelService service. All implementations must embed UnimplementedModelServiceServer for forward compatibility.

type ModelStatusReq

type ModelStatusReq struct {
	ModelId  string `protobuf:"bytes,1,opt,name=modelId,proto3" json:"modelId,omitempty"`
	IsActive bool   `protobuf:"varint,2,opt,name=isActive,proto3" json:"isActive,omitempty"` // 启用状态(true: 启用,false: 禁用)
	UserId   string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"`
	OrgId    string `protobuf:"bytes,4,opt,name=orgId,proto3" json:"orgId,omitempty"`
	// contains filtered or unexported fields
}

func (*ModelStatusReq) Descriptor deprecated

func (*ModelStatusReq) Descriptor() ([]byte, []int)

Deprecated: Use ModelStatusReq.ProtoReflect.Descriptor instead.

func (*ModelStatusReq) GetIsActive

func (x *ModelStatusReq) GetIsActive() bool

func (*ModelStatusReq) GetModelId added in v0.2.1

func (x *ModelStatusReq) GetModelId() string

func (*ModelStatusReq) GetOrgId

func (x *ModelStatusReq) GetOrgId() string

func (*ModelStatusReq) GetUserId

func (x *ModelStatusReq) GetUserId() string

func (*ModelStatusReq) ProtoMessage

func (*ModelStatusReq) ProtoMessage()

func (*ModelStatusReq) ProtoReflect

func (x *ModelStatusReq) ProtoReflect() protoreflect.Message

func (*ModelStatusReq) Reset

func (x *ModelStatusReq) Reset()

func (*ModelStatusReq) String

func (x *ModelStatusReq) String() string

type UnimplementedModelServiceServer

type UnimplementedModelServiceServer struct{}

UnimplementedModelServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedModelServiceServer) ChangeModelStatus

func (UnimplementedModelServiceServer) DeleteModel

func (UnimplementedModelServiceServer) GetModel

func (UnimplementedModelServiceServer) GetModelById

func (UnimplementedModelServiceServer) GetModelByIds

func (UnimplementedModelServiceServer) ImportModel

func (UnimplementedModelServiceServer) ListModels

func (UnimplementedModelServiceServer) ListTypeModels

func (UnimplementedModelServiceServer) UpdateModel

type UnsafeModelServiceServer

type UnsafeModelServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeModelServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ModelServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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