pcm-coordinator/desc/inference/inference.api

80 lines
2.4 KiB
Plaintext

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{
}
)