Documentation
¶
Index ¶
- func GenerateImage(req *ImageRequest) (string, error)
- type CheckText2ImageTaskResponse
- type ImageRequest
- type Input
- type Output
- type Params
- type QianWen
- func (o *QianWen) ChatStream(ctx context.Context, req *llm.ChatCompletionRequest, ...)
- func (o *QianWen) GenerateContentFromImage(ctx context.Context, req *llm.GenerateContentFromImageRequest) (*llm.GenerateContentFromImageResponse, error)
- func (o *QianWen) GenerateImage(ctx context.Context, req *llm.GenerateImageRequest) (*llm.GenerateImageResponse, error)
- func (o *QianWen) GetConf() llm.Conf
- type Result
- type TaskMetrics
- type TaskOutput
- type TaskStatus
- type Text2ImageRequest
- type Text2ImageResponse
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateImage ¶
func GenerateImage(req *ImageRequest) (string, error)
Types ¶
type CheckText2ImageTaskResponse ¶
type CheckText2ImageTaskResponse struct { RequestID string `json:"request_id"` Output TaskOutput `json:"output"` Usage *Usage `json:"usage,omitempty"` }
func CheckText2ImageTask ¶
func CheckText2ImageTask(apiKey, taskID string) (CheckText2ImageTaskResponse, error)
type ImageRequest ¶
type QianWen ¶
func NewQianWen ¶
func (*QianWen) ChatStream ¶
func (o *QianWen) ChatStream(ctx context.Context, req *llm.ChatCompletionRequest, respChan chan llm.ChatCompletionStreamResponse)
func (*QianWen) GenerateContentFromImage ¶
func (o *QianWen) GenerateContentFromImage(ctx context.Context, req *llm.GenerateContentFromImageRequest) (*llm.GenerateContentFromImageResponse, error)
func (*QianWen) GenerateImage ¶
func (o *QianWen) GenerateImage(ctx context.Context, req *llm.GenerateImageRequest) (*llm.GenerateImageResponse, error)
type TaskMetrics ¶
type TaskOutput ¶
type TaskOutput struct { TaskID string `json:"task_id"` TaskStatus TaskStatus `json:"task_status"` Results []Result `json:"results,omitempty"` TaskMetrics TaskMetrics `json:"task_metrics"` Code string `json:"code,omitempty"` Message string `json:"message,omitempty"` }
type TaskStatus ¶
type TaskStatus string
const ( Running TaskStatus = "RUNNING" Succeeded TaskStatus = "SUCCEEDED" Failed TaskStatus = "FAILED" )
type Text2ImageRequest ¶
type Text2ImageResponse ¶
type Text2ImageResponse struct { Code string `json:"code"` Message string `json:"message"` Output Output `json:"output"` RequestId string `json:"request_id"` }
func SubmitText2ImageTask ¶
func SubmitText2ImageTask(imageRequest *ImageRequest) (*Text2ImageResponse, error)
Click to show internal directories.
Click to hide internal directories.