Versions in this module Expand all Collapse all v0 v0.0.1 Feb 6, 2025 Changes in this version + var ModelList = []string + func ChatHandler(c *gin.Context, resp *http.Response) (srvErr *model.ErrorWithStatusCode, usage *model.Usage) + func ConvertImageToPNG(webpData []byte) ([]byte, error) + func ImageHandler(c *gin.Context, resp *http.Response) (*model.ErrorWithStatusCode, *model.Usage) + type Adaptor struct + func (*Adaptor) ConvertImageRequest(request *model.ImageRequest) (any, error) + func (a *Adaptor) ConvertRequest(c *gin.Context, relayMode int, request *model.GeneralOpenAIRequest) (any, error) + func (a *Adaptor) DoRequest(c *gin.Context, meta *meta.Meta, requestBody io.Reader) (*http.Response, error) + func (a *Adaptor) DoResponse(c *gin.Context, resp *http.Response, meta *meta.Meta) (usage *model.Usage, err *model.ErrorWithStatusCode) + func (a *Adaptor) GetChannelName() string + func (a *Adaptor) GetModelList() []string + func (a *Adaptor) GetRequestURL(meta *meta.Meta) (string, error) + func (a *Adaptor) Init(meta *meta.Meta) + func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Request, meta *meta.Meta) error + type ChatInput struct + FrequencyPenalty float64 + MaxTokens int + MinTokens int + PresencePenalty float64 + Prompt string + PromptTemplate string + StopSequences string + SystemPrompt string + Temperature float64 + TopK int + TopP float64 + type ChatResponse struct + CompletedAt time.Time + CreatedAt time.Time + DataRemoved bool + Error string + ID string + Input ChatInput + Logs string + Metrics FluxMetrics + Output []string + StartedAt time.Time + Status string + URLs ChatResponseUrl + Version string + type ChatResponseUrl struct + Cancel string + Get string + Stream string + type DrawImageRequest struct + Input ImageInput + type FluxInpaintingInput struct + Guidance int + Image string + Mask string + OutputFormat string + Prompt string + PromptUnsampling bool + SafetyTolerance int + Seed int + Steps int + type FluxMetrics struct + ImageCount int + PredictTime float64 + TotalTime float64 + type FluxURLs struct + Cancel string + Get string + type ImageInput struct + AspectRatio string + Guidance int + Height int + ImagePrompt string + Interval int + NImages int + Prompt string + SafetyTolerance int + Seed int + Steps int + Width int + type ImageResponse struct + CompletedAt time.Time + CreatedAt time.Time + DataRemoved bool + Error string + ID string + Input DrawImageRequest + Logs string + Metrics FluxMetrics + Output any + StartedAt time.Time + Status string + URLs FluxURLs + Version string + func (r *ImageResponse) GetOutput() ([]string, error) + type InpaintingImageByFlusReplicateRequest struct + Input FluxInpaintingInput + type ReplicateChatRequest struct + Input ChatInput