Versions in this module Expand all Collapse all v1 v1.0.3-preview.2 Jun 27, 2026 v1.0.3-preview Jun 24, 2026 v1.0.2 Jun 22, 2026 v1.0.1 Jun 20, 2026 v1.0.0 Jun 19, 2026 Changes in this version + const EnableSearchModelSuffix + var ChannelName = "ali" + var ModelList = []string + func RerankHandler(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo) (*types.MaxAPIError, *dto.Usage) + type Adaptor struct + IsSyncImageModel bool + func (a *Adaptor) ConvertAudioRequest(c *gin.Context, info *relaycommon.RelayInfo, request dto.AudioRequest) (io.Reader, error) + func (a *Adaptor) ConvertClaudeRequest(c *gin.Context, info *relaycommon.RelayInfo, req *dto.ClaudeRequest) (any, error) + func (a *Adaptor) ConvertEmbeddingRequest(c *gin.Context, info *relaycommon.RelayInfo, request dto.EmbeddingRequest) (any, error) + func (a *Adaptor) ConvertGeminiRequest(*gin.Context, *relaycommon.RelayInfo, *dto.GeminiChatRequest) (any, error) + func (a *Adaptor) ConvertImageRequest(c *gin.Context, info *relaycommon.RelayInfo, request dto.ImageRequest) (any, error) + func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeneralOpenAIRequest) (any, error) + func (a *Adaptor) ConvertOpenAIResponsesRequest(c *gin.Context, info *relaycommon.RelayInfo, ...) (any, error) + func (a *Adaptor) ConvertRerankRequest(c *gin.Context, relayMode int, request dto.RerankRequest) (any, error) + func (a *Adaptor) DoRequest(c *gin.Context, info *relaycommon.RelayInfo, requestBody io.Reader) (any, error) + func (a *Adaptor) DoResponse(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo) (usage any, err *types.MaxAPIError) + func (a *Adaptor) GetChannelName() string + func (a *Adaptor) GetModelList() []string + func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) + func (a *Adaptor) Init(info *relaycommon.RelayInfo) + func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo) error + type AliChatRequest struct + Input AliInput + Model string + Parameters AliParameters + type AliEmbedding struct + Embedding []float64 + TextIndex int + type AliEmbeddingRequest struct + Input struct{ ... } + Model string + Parameters ... + type AliEmbeddingResponse struct + Output struct{ ... } + Usage AliUsage + type AliError struct + Code string + Message string + RequestId string + type AliImageInput struct + Messages []AliMessage + NegativePrompt string + Prompt string + type AliImageParameters struct + BboxList any + ColorPalette any + EnableSequential *bool + N int + PromptExtend *bool + Scale string + Seed *int + Size string + Steps string + ThinkingMode *bool + Watermark *bool + func (p *AliImageParameters) PromptExtendValue() bool + type AliImageRequest struct + Input any + Model string + Parameters AliImageParameters + ResponseFormat string + type AliInput struct + Messages []AliMessage + Prompt string + type AliMediaContent struct + Image string + Text string + type AliMessage struct + Content any + Role string + type AliOutput struct + Choices []struct{ ... } + Code string + FinishReason string + Message string + Results []TaskResult + TaskId string + TaskStatus string + Text string + func (o *AliOutput) ChoicesToOpenAIImageDate(c *gin.Context, responseFormat string) []dto.ImageData + func (o *AliOutput) ResultToOpenAIImageDate(c *gin.Context, responseFormat string) []dto.ImageData + type AliParameters struct + EnableSearch bool + IncrementalOutput bool + Seed uint64 + TopK int + TopP float64 + type AliRerankInput struct + Documents []any + Query string + type AliRerankParameters struct + ReturnDocuments *bool + TopN *int + type AliRerankRequest struct + Input AliRerankInput + Model string + Parameters AliRerankParameters + func ConvertRerankRequest(request dto.RerankRequest) *AliRerankRequest + type AliRerankResponse struct + Output struct{ ... } + RequestId string + Usage AliUsage + type AliResponse struct + Output AliOutput + Usage AliUsage + type AliUsage struct + ImageCount int + InputTokens int + OutputTokens int + TotalTokens int + type TaskResult struct + B64Image string + Code string + Message string + Url string + type WanImageInput struct + Images []string + NegativePrompt string + Prompt string + type WanImageParameters struct + N int + Seed int + Strength float64 + Watermark *bool