syntax = "v1" type ( /******************image inference*************************/ ModelTypesResp { ModelTypes []string `json:"types"` } ModelNamesReq { Type string `form:"type"` } ModelNamesResp { ModelNames []string `json:"models"` } /******************image inference*************************/ ImageInferenceReq { TaskName string `form:"taskName"` TaskDesc string `form:"taskDesc"` ModelName string `form:"modelName"` ModelType string `form:"modelType"` AdapterId string `form:"adapterId"` AiClusterIds []string `form:"aiClusterIds,optional"` ResourceType string `form:"resourceType,optional"` ComputeCard string `form:"card,optional"` Strategy string `form:"strategy"` StaticWeightMap map[string]int32 `form:"staticWeightMap,optional"` Params []string `form:"params,optional"` Envs []string `form:"envs,optional"` Cmd string `form:"cmd,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"` ModelName string `form:"modelName"` ModelType string `form:"modelType"` AdapterId string `form:"adapterId"` AiClusterIds []string `form:"aiClusterIds"` } TextToTextInferenceResp{ } /******************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 { } GetDeployTasksReq { PageInfo } GetDeployTasksResp { PageResult } )