|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- 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*************************/
-
- 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"`
- ModelName string `form:"modelName"`
- ModelType string `form:"modelType"`
- AdapterId string `form:"adapterId"`
- AiClusterIds []string `form:"aiClusterIds"`
- }
- 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:"taskName"`
- Clusters []ClusterAvail `json:"clusters"`
- }
-
- ClusterAvail {
- ClusterId string `json:"clusterId"`
- ClusterName string `json:"clusterName"`
- }
-
-
- )
|