|
- syntax = "v1"
-
- type (
- /******************image inference*************************/
- DeployInstance {
- Id string `json:"id"`
- DeployTaskId string `json:"deployTaskId"`
- InstanceId string `json:"instanceId"`
- InstanceName string `json:"instanceName"`
- AdapterId string `json:"adapterId"`
- AdapterName string `json:"adapterName"`
- ClusterId string `json:"clusterId"`
- ClusterName string `json:"clusterName"`
- ModelName string `json:"modelName"`
- ModelType string `json:"modelType"`
- InferCard string `json:"inferCard"`
- Status string `json:"status"`
- CreateTime string `json:"createTime"`
- UpdateTime string `json:"updateTime"`
- ClusterType string `json:"clusterType"`
- }
-
- /******************image inference*************************/
- ModelTypesResp {
- ModelTypes []string `json:"types"`
- }
-
- ModelNamesReq {
- Type string `form:"type"`
- }
-
- ModelNamesResp {
- ModelNames []string `json:"models"`
- }
- /******************image inference*************************/
- /******************instance center*************************/
- InstanceCenterReq{
- InstanceType int32 `form:"instance_type"`
- InstanceClass string `form:"instance_class,optional"`
- InstanceName string `form:"instance_name,optional"`
- }
- InstanceCenterResp {
- InstanceCenterList []InstanceCenterList `json:"instanceCenterList" copier:"InstanceCenterList"`
- Code int32 `json:"code,omitempty"`
- Msg string `json:"msg,omitempty"`
- ErrorMsg string `json:"errorMsg,omitempty"`
- TotalCount int `json:"totalCount"`
- }
- InstanceCenterList {
- LogoPath string `json:"logo_path"`
- InstanceName string `json:"instance_name"`
- InstanceType int32 `json:"instance_type"`
- InstanceClass string `json:"instance_class"`
- InstanceClassChinese string `json:"instance_class_chinese"`
- Description string `json:"description"`
- Version string `json:"version"`
- }
-
- /******************instance center*************************/
-
- ImageInferenceReq {
- TaskName string `form:"taskName"`
- TaskDesc string `form:"taskDesc"`
- ModelType string `form:"modelType"`
- InstanceIds []int64 `form:"instanceIds"`
- Strategy string `form:"strategy,,optional"`
- StaticWeightMap map[string]map[string]int32 `form:"staticWeightMap,optional"`
- Replica int32 `form:"replicas,optional"`
- }
-
- ImageInferenceResp {
- InferResults []*ImageResult `json:"result"`
- }
-
- ImageResult {
- ClusterId string `json:"clusterId"`
- ClusterName string `json:"clusterName"`
- ImageName string `json:"imageName"`
- Card string `json:"card"`
- ImageResult string `json:"imageResult"`
- }
-
- InferenceTaskDetailReq{
- taskId int64 `form:"taskId"`
- }
-
- InferenceTaskDetailResp{
- InferenceResults []InferenceResult `json:"data"`
- Code int32 `json:"code,omitempty"`
- Msg string `json:"msg,omitempty"`
- }
-
- InferenceResult{
- imageName string `json:"imageName"`
- TaskName string `json:"taskName"`
- TaskAiName string `json:"taskAiName"`
- result string `json:"result"`
- card string `json:"card"`
- clusterName string `json:"clusterName"`
- }
-
- /******************TextToText inference*************************/
- TextToTextInferenceReq{
- TaskName string `form:"taskName"`
- TaskDesc string `form:"taskDesc"`
- ModelType string `form:"modelType"`
- InstanceId int64 `form:"instanceId"`
- }
- TextToTextInferenceResp{
-
- }
-
- /******************TextToImage inference*************************/
- TextToImageInferenceReq{
- TaskName string `form:"taskName"`
- TaskDesc string `form:"taskDesc"`
- ModelName string `form:"modelName"`
- ModelType string `form:"modelType"`
- AiClusterIds []string `form:"aiClusterIds"`
- }
- TextToImageInferenceResp{
- Result []byte `json:"result"`
- }
-
- /******************Deploy instance*************************/
- DeployInstanceListReq{
- PageInfo
- }
-
- DeployInstanceListResp {
- PageResult
- }
-
- StartDeployInstanceReq {
- AdapterId string `form:"adapterId"`
- ClusterId string `form:"clusterId"`
- Id string `form:"id"`
- InstanceId string `form:"instanceId"`
- }
-
- StartDeployInstanceResp {
- }
-
- StopDeployInstanceReq {
- AdapterId string `form:"adapterId"`
- ClusterId string `form:"clusterId"`
- Id string `form:"id"`
- InstanceId string `form:"instanceId"`
- }
-
- StopDeployInstanceResp {
- }
-
- DeployInstanceStatReq {
-
- }
-
- DeployInstanceStatResp {
- Running int32 `json:"running"`
- Total int32 `json:"total"`
- }
-
- InferenceTaskStatReq {}
-
- InferenceTaskStatResp {
- Running int32 `json:"running"`
- Total int32 `json:"total"`
- }
-
- StartAllByDeployTaskIdReq {
- Id string `json:"deployTaskId"`
- }
-
- StartAllByDeployTaskIdResp {
-
- }
-
- StopAllByDeployTaskIdReq {
- Id string `json:"deployTaskId"`
- }
-
- StopAllByDeployTaskIdResp {
-
- }
-
- GetRunningInstanceReq {
- Id string `form:"deployTaskId"`
- AdapterId string `form:"adapterId"`
- }
- GetRunningInstanceResp {
- List interface{} `json:"list"`
- }
-
- GetDeployTasksByTypeReq {
- ModelType string `form:"modelType"`
- }
-
- GetDeployTasksByTypeResp {
- List interface{} `json:"list"`
- }
-
- CreateDeployTaskReq {
- TaskName string `form:"taskName"`
- TaskDesc string `form:"taskDesc"`
- ModelName string `form:"modelName"`
- ModelType string `form:"modelType"`
- AdapterClusterMap map[string][]string `form:"adapterClusterMap"`
- }
-
- CreateDeployTaskResp {
-
- }
-
- GetAdaptersByModelReq {
- ModelName string `form:"modelName"`
- ModelType string `form:"modelType"`
- }
-
- GetAdaptersByModelResp {
- Adapters []*AdapterAvail `json:"adapters"`
- }
-
- AdapterAvail {
- AdapterId string `json:"adapterId"`
- AdapterName string `json:"adapterName"`
- Clusters []*ClusterAvail `json:"clusters"`
- }
-
- ClusterAvail {
- ClusterId string `json:"clusterId"`
- ClusterName string `json:"clusterName"`
- }
-
-
- )
|