Documentation ¶
Index ¶
- Constants
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type AiServiceAiCreationApiService
- type AiServiceImageApiService
- func (a *AiServiceImageApiService) AiModelImage(ctx context.Context, body *model.ImageRequest) (*model.Response, *http.Response, error)
- func (a *AiServiceImageApiService) ClassifyImage(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) DetectClassifyImage(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) FaceAttrImage(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) FaceBeautyImage(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) FaceDetectImage(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) FaceRecognitionImage(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) ImageQA(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) MultiLabelImage(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) MultiLabelImageV2(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) OCRImage(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) ProductDetectImage(image, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceImageApiService) ScanImage(image, modelName string, config map[string]interface{}) (*model.Response, error)
- type AiServiceImageTextApiService
- func (a *AiServiceImageTextApiService) AiModelImageWithText(ctx context.Context, body *model.ImageWithTextRequest) (*model.Response, *http.Response, error)
- func (a AiServiceImageTextApiService) ImageTextTag(images []string, text string, modelName string, config map[string]interface{}) (*model.Response, error)
- type AiServiceJobApiService
- func (a *AiServiceJobApiService) GetAsyncJob(jobId int32) (*model.AsyncJobResponse, *http.Response, error)
- func (a *AiServiceJobApiService) GetAsyncJobWithId(jobId int32) (*model.AsyncJobResponse, error)
- func (a *AiServiceJobApiService) GetBatchJob(batchId int32) (*model.Response, *http.Response, error)
- func (a *AiServiceJobApiService) GetBatchJobWithId(batchId int32) (*model.Response, error)
- type AiServiceLlmApiService
- type AiServiceTextApiService
- func (a *AiServiceTextApiService) AiModelText(ctx context.Context, body *model.TextRequest) (*model.Response, *http.Response, error)
- func (a *AiServiceTextApiService) AntiSpamText(text, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceTextApiService) EcomerceReviewSentimentAnalysisText(text, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceTextApiService) FineGrainedLabelText(text, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceTextApiService) KeyWordText(text, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceTextApiService) NERText(text, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceTextApiService) SentimentAnalysisText(text, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceTextApiService) VectorizationText(text, modelName string, config map[string]interface{}) (*model.Response, error)
- type AiServiceVideoApiService
- func (a *AiServiceVideoApiService) AiModelBatchVideo(ctx context.Context, body *model.BatchVideoRequest) (*model.Response, *http.Response, error)
- func (a *AiServiceVideoApiService) AiModelVideo(ctx context.Context, body *model.VideoRequest) (*model.Response, *http.Response, error)
- func (a *AiServiceVideoApiService) BatchClassifyLabelVideo(videos []model.VideoMeta, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceVideoApiService) BatchVideoQA(videos []model.VideoMeta, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceVideoApiService) ClassifyLabelVideo(videoUrl, videoTitle, modelName string, config map[string]interface{}) (*model.Response, error)
- func (a *AiServiceVideoApiService) MultiModalClassify(videoUrl string, images []string, text string, modelName string, ...) (*model.Response, error)
- func (a *AiServiceVideoApiService) VideoQA(videoUrl, videoTitle, modelName string, config map[string]interface{}) (*model.Response, error)
- type AigcImagesApiService
- func (a *AigcImagesApiService) AigcImageCheck(images []string, modelName string, config map[string]interface{}) (*model.AIGCImageCheckResponse, error)
- func (a *AigcImagesApiService) AigcImagesCheckPost(ctx context.Context, body *model.AigcCheckRequest) (*model.AIGCImageCheckResponse, *http.Response, error)
- func (a *AigcImagesApiService) AigcImagesCreate(modelId, templateImage, modelName string, config map[string]interface{}) (*model.AIGCImageCreateResponse, error)
- func (a *AigcImagesApiService) AigcImagesCreateByMultiModelIds(modelIds []string, templateImage, modelName string, ...) (*model.AIGCImageCreateResponse, error)
- func (a *AigcImagesApiService) AigcImagesCreatePost(ctx context.Context, body *model.AigcCreatRequest) (*model.AIGCImageCreateResponse, *http.Response, error)
- func (a *AigcImagesApiService) AigcImagesTrain(images []string, modelName string, config map[string]interface{}) (*model.AIGCImageTrainResponse, error)
- func (a *AigcImagesApiService) AigcImagesTrainPost(ctx context.Context, body *model.AigcTrainRequest) (*model.AIGCImageTrainResponse, *http.Response, error)
- type BasicAuth
- type ChatCompletionMessage
- type ChatCompletionRequest
- type Configuration
- type GenericSwaggerError
Constants ¶
const ( VIDEO_PATH = "/api/v1/videos" BATCH_VIDEO_PATH = "/api/v1/batch_videos" )
const ( JOB_STATE_INIT = 0 JOB_STATE_WAIT = 1 JOB_STATE_SUCCESS = 2 JOB_STATE_FAILED = 3 )
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { AiCreationApi *AiServiceAiCreationApiService ImageApi *AiServiceImageApiService TextApi *AiServiceTextApiService ImageTextApi *AiServiceImageTextApiService VideoApi *AiServiceVideoApiService JobApi *AiServiceJobApiService AIGCApi *AigcImagesApiService LLMApi *AiServiceLlmApiService // contains filtered or unexported fields }
APIClient manages communication with the AI model Service Restful API API v1.0.0 In most cases there should be only one, shared, APIClient.
func NewClient ¶
NewClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type AiServiceAiCreationApiService ¶
type AiServiceAiCreationApiService service
func (*AiServiceAiCreationApiService) AICreation ¶
func (*AiServiceAiCreationApiService) AiModelCreation ¶
func (a *AiServiceAiCreationApiService) AiModelCreation(ctx context.Context, body model.AiCreationRequest) (*model.Response, *http.Response, error)
AiModelCreation AiServiceAiCreationApiService AI创作接口 - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param body AI创作body return Response *
type AiServiceImageApiService ¶
type AiServiceImageApiService service
func (*AiServiceImageApiService) AiModelImage ¶
func (a *AiServiceImageApiService) AiModelImage(ctx context.Context, body *model.ImageRequest) (*model.Response, *http.Response, error)
AiServiceImageApiService 图片检测接口
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body 图片检测body
@return Response
func (*AiServiceImageApiService) ClassifyImage ¶
func (*AiServiceImageApiService) DetectClassifyImage ¶
func (*AiServiceImageApiService) FaceAttrImage ¶
func (*AiServiceImageApiService) FaceBeautyImage ¶
func (*AiServiceImageApiService) FaceDetectImage ¶
func (*AiServiceImageApiService) FaceRecognitionImage ¶
func (*AiServiceImageApiService) MultiLabelImage ¶
func (*AiServiceImageApiService) MultiLabelImageV2 ¶
func (*AiServiceImageApiService) ProductDetectImage ¶
type AiServiceImageTextApiService ¶
type AiServiceImageTextApiService service
func (*AiServiceImageTextApiService) AiModelImageWithText ¶
func (a *AiServiceImageTextApiService) AiModelImageWithText(ctx context.Context, body *model.ImageWithTextRequest) (*model.Response, *http.Response, error)
AiServiceImageTextApiService 图片检测接口
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body 图文检测body
@return Response
func (AiServiceImageTextApiService) ImageTextTag ¶
type AiServiceJobApiService ¶
type AiServiceJobApiService service
func (*AiServiceJobApiService) GetAsyncJob ¶
func (a *AiServiceJobApiService) GetAsyncJob(jobId int32) (*model.AsyncJobResponse, *http.Response, error)
AiServiceJobApiService 根据 jobid 查询异步任务
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param jobId job id
@return Response
func (*AiServiceJobApiService) GetAsyncJobWithId ¶
func (a *AiServiceJobApiService) GetAsyncJobWithId(jobId int32) (*model.AsyncJobResponse, error)
func (*AiServiceJobApiService) GetBatchJob ¶
func (a *AiServiceJobApiService) GetBatchJob(batchId int32) (*model.Response, *http.Response, error)
AiServiceJobApiService 根据 batch id 查询异步任务
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param batchId batch id
@return Response
func (*AiServiceJobApiService) GetBatchJobWithId ¶
func (a *AiServiceJobApiService) GetBatchJobWithId(batchId int32) (*model.Response, error)
type AiServiceLlmApiService ¶
type AiServiceLlmApiService service
func (*AiServiceLlmApiService) LlmEvalJudger ¶
func (a *AiServiceLlmApiService) LlmEvalJudger(request ChatCompletionRequest, modelName string) (*model.LLMEvalJudgerResponse, error)
func (*AiServiceLlmApiService) LlmEvalJudgerPost ¶
func (a *AiServiceLlmApiService) LlmEvalJudgerPost(ctx context.Context, body model.LlmEvalJudgerRequest) (*model.LLMEvalJudgerResponse, *http.Response, error)
AiServiceLlmApiService 裁判员模型服务
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body llm eval judger body
@return Response
type AiServiceTextApiService ¶
type AiServiceTextApiService service
func (*AiServiceTextApiService) AiModelText ¶
func (a *AiServiceTextApiService) AiModelText(ctx context.Context, body *model.TextRequest) (*model.Response, *http.Response, error)
AiServiceTextApiService 文本检测接口
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body 文本检测body
@return Response
func (*AiServiceTextApiService) AntiSpamText ¶
func (*AiServiceTextApiService) EcomerceReviewSentimentAnalysisText ¶
func (*AiServiceTextApiService) FineGrainedLabelText ¶
func (*AiServiceTextApiService) KeyWordText ¶
func (*AiServiceTextApiService) SentimentAnalysisText ¶
func (*AiServiceTextApiService) VectorizationText ¶
type AiServiceVideoApiService ¶
type AiServiceVideoApiService service
func (*AiServiceVideoApiService) AiModelBatchVideo ¶
func (a *AiServiceVideoApiService) AiModelBatchVideo(ctx context.Context, body *model.BatchVideoRequest) (*model.Response, *http.Response, error)
func (*AiServiceVideoApiService) AiModelVideo ¶
func (a *AiServiceVideoApiService) AiModelVideo(ctx context.Context, body *model.VideoRequest) (*model.Response, *http.Response, error)
AiServiceVideoApiService 视频检测接口
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body 视频检测body
@return Response
func (*AiServiceVideoApiService) BatchClassifyLabelVideo ¶
func (*AiServiceVideoApiService) BatchVideoQA ¶
func (*AiServiceVideoApiService) ClassifyLabelVideo ¶
func (*AiServiceVideoApiService) MultiModalClassify ¶
type AigcImagesApiService ¶
type AigcImagesApiService service
func (*AigcImagesApiService) AigcImageCheck ¶
func (a *AigcImagesApiService) AigcImageCheck(images []string, modelName string, config map[string]interface{}) (*model.AIGCImageCheckResponse, error)
func (*AigcImagesApiService) AigcImagesCheckPost ¶
func (a *AigcImagesApiService) AigcImagesCheckPost(ctx context.Context, body *model.AigcCheckRequest) (*model.AIGCImageCheckResponse, *http.Response, error)
AigcImagesApiService aigc图像检测
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body aigc检测body
@return Response
func (*AigcImagesApiService) AigcImagesCreate ¶
func (a *AigcImagesApiService) AigcImagesCreate(modelId, templateImage, modelName string, config map[string]interface{}) (*model.AIGCImageCreateResponse, error)
func (*AigcImagesApiService) AigcImagesCreateByMultiModelIds ¶
func (a *AigcImagesApiService) AigcImagesCreateByMultiModelIds(modelIds []string, templateImage, modelName string, config map[string]interface{}) (*model.AIGCImageCreateResponse, error)
func (*AigcImagesApiService) AigcImagesCreatePost ¶
func (a *AigcImagesApiService) AigcImagesCreatePost(ctx context.Context, body *model.AigcCreatRequest) (*model.AIGCImageCreateResponse, *http.Response, error)
AigcImagesApiService aigc预测
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body aigc预测body
@return AIGCImageCreateResponse
func (*AigcImagesApiService) AigcImagesTrain ¶
func (a *AigcImagesApiService) AigcImagesTrain(images []string, modelName string, config map[string]interface{}) (*model.AIGCImageTrainResponse, error)
func (*AigcImagesApiService) AigcImagesTrainPost ¶
func (a *AigcImagesApiService) AigcImagesTrainPost(ctx context.Context, body *model.AigcTrainRequest) (*model.AIGCImageTrainResponse, *http.Response, error)
AigcImagesApiService aigc图像
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body aigc图像body
@return AIGCImageTrainResponse
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type ChatCompletionMessage ¶
type ChatCompletionRequest ¶
type ChatCompletionRequest struct { Model string Messages []ChatCompletionMessage }
type Configuration ¶
type Configuration struct { AppID string `json:"app_id,omitempty"` BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client HostAddress string `json:"-"` // contains filtered or unexported fields }
func NewConfiguration ¶
func NewConfiguration(host, appid, token string) *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
* AI model Service Restful API * * This is an ai model service * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
* AI model Service Restful API * * This is an ai model service * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) |