general

package
v2.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type General

type General struct {
	*options.AdapterOptions
	// contains filtered or unexported fields
}

func NewAdapter

func NewAdapter(ctx context.Context, options *options.AdapterOptions) *General

func (*General) AudioSpeech

func (g *General) AudioSpeech(ctx context.Context, data []byte) (response model.SpeechResponse, err error)

func (*General) AudioTranscriptions

func (g *General) AudioTranscriptions(ctx context.Context, request model.AudioRequest) (response model.AudioResponse, err error)

func (*General) BatchCancel

func (g *General) BatchCancel(ctx context.Context, request model.BatchCancelRequest) (response model.BatchResponse, err error)

func (*General) BatchCreate

func (g *General) BatchCreate(ctx context.Context, request model.BatchCreateRequest) (response model.BatchResponse, err error)

func (*General) BatchList

func (g *General) BatchList(ctx context.Context, request model.BatchListRequest) (response model.BatchListResponse, err error)

func (*General) BatchRetrieve

func (g *General) BatchRetrieve(ctx context.Context, request model.BatchRetrieveRequest) (response model.BatchResponse, err error)

func (*General) ChatCompletions

func (g *General) ChatCompletions(ctx context.Context, data any) (response model.ChatCompletionResponse, err error)

func (*General) ChatCompletionsOfficial

func (g *General) ChatCompletionsOfficial(ctx context.Context, data []byte) (response any, err error)

func (*General) ChatCompletionsStream

func (g *General) ChatCompletionsStream(ctx context.Context, data any) (responseChan chan *model.ChatCompletionResponse, err error)

func (*General) ChatCompletionsStreamOfficial

func (g *General) ChatCompletionsStreamOfficial(ctx context.Context, data []byte) (responseChan chan any, err error)

func (*General) ConvAudioSpeechRequest

func (g *General) ConvAudioSpeechRequest(ctx context.Context, data []byte) (request model.SpeechRequest, err error)

func (*General) ConvAudioSpeechResponse

func (g *General) ConvAudioSpeechResponse(ctx context.Context, data []byte) (response model.SpeechResponse, err error)

func (*General) ConvAudioTranscriptionsRequest

func (g *General) ConvAudioTranscriptionsRequest(ctx context.Context, request model.AudioRequest) (data *bytes.Buffer, err error)

func (*General) ConvAudioTranscriptionsResponse

func (g *General) ConvAudioTranscriptionsResponse(ctx context.Context, data []byte) (response model.AudioResponse, err error)

func (*General) ConvBatchCreateRequest

func (g *General) ConvBatchCreateRequest(ctx context.Context, request model.BatchCreateRequest) (data *bytes.Buffer, err error)

func (*General) ConvBatchListResponse

func (g *General) ConvBatchListResponse(ctx context.Context, data []byte) (response model.BatchListResponse, err error)

func (*General) ConvBatchResponse

func (g *General) ConvBatchResponse(ctx context.Context, data []byte) (response model.BatchResponse, err error)

func (*General) ConvChatCompletionsRequest

func (g *General) ConvChatCompletionsRequest(ctx context.Context, data any) (request model.ChatCompletionRequest, err error)

func (*General) ConvChatCompletionsRequestOfficial

func (g *General) ConvChatCompletionsRequestOfficial(ctx context.Context, request model.ChatCompletionRequest) ([]byte, error)

func (*General) ConvChatCompletionsResponse

func (g *General) ConvChatCompletionsResponse(ctx context.Context, data []byte) (response model.ChatCompletionResponse, err error)

func (*General) ConvChatCompletionsResponseOfficial

func (g *General) ConvChatCompletionsResponseOfficial(ctx context.Context, response model.ChatCompletionResponse) ([]byte, error)

func (*General) ConvChatCompletionsStreamResponse

func (g *General) ConvChatCompletionsStreamResponse(ctx context.Context, data []byte) (response model.ChatCompletionResponse, err error)

func (*General) ConvChatCompletionsStreamResponseOfficial

func (g *General) ConvChatCompletionsStreamResponseOfficial(ctx context.Context, response model.ChatCompletionResponse) ([]byte, error)

func (*General) ConvChatResponsesRequest

func (g *General) ConvChatResponsesRequest(ctx context.Context, data []byte) (request model.ChatCompletionRequest, err error)

func (*General) ConvChatResponsesResponse

func (g *General) ConvChatResponsesResponse(ctx context.Context, data []byte) (response model.ChatCompletionResponse, err error)

func (*General) ConvChatResponsesStreamResponse

func (g *General) ConvChatResponsesStreamResponse(ctx context.Context, data []byte) (response model.ChatCompletionResponse, err error)

func (*General) ConvFileContentResponse

func (g *General) ConvFileContentResponse(ctx context.Context, data []byte) (response model.FileContentResponse, err error)

func (*General) ConvFileListResponse

func (g *General) ConvFileListResponse(ctx context.Context, data []byte) (response model.FileListResponse, err error)

func (*General) ConvFileResponse

func (g *General) ConvFileResponse(ctx context.Context, data []byte) (response model.FileResponse, err error)

func (*General) ConvFileUploadRequest

func (g *General) ConvFileUploadRequest(ctx context.Context, request model.FileUploadRequest) (data *bytes.Buffer, err error)

func (*General) ConvImageEditsRequest

func (g *General) ConvImageEditsRequest(ctx context.Context, request model.ImageEditRequest) (data *bytes.Buffer, err error)

func (*General) ConvImageEditsRequestOfficial

func (g *General) ConvImageEditsRequestOfficial(ctx context.Context, request model.ImageEditRequest) ([]byte, error)

func (*General) ConvImageEditsResponse

func (g *General) ConvImageEditsResponse(ctx context.Context, data []byte) (response model.ImageResponse, err error)

func (*General) ConvImageEditsResponseOfficial

func (g *General) ConvImageEditsResponseOfficial(ctx context.Context, response model.ImageResponse) ([]byte, error)

func (*General) ConvImageGenerationsRequest

func (g *General) ConvImageGenerationsRequest(ctx context.Context, data []byte) (request model.ImageGenerationRequest, err error)

func (*General) ConvImageGenerationsRequestOfficial

func (g *General) ConvImageGenerationsRequestOfficial(ctx context.Context, request model.ImageGenerationRequest) ([]byte, error)

func (*General) ConvImageGenerationsResponse

func (g *General) ConvImageGenerationsResponse(ctx context.Context, data []byte) (response model.ImageResponse, err error)

func (*General) ConvImageGenerationsResponseOfficial

func (g *General) ConvImageGenerationsResponseOfficial(ctx context.Context, response model.ImageResponse) ([]byte, error)

func (*General) ConvTextEmbeddingsRequest

func (g *General) ConvTextEmbeddingsRequest(ctx context.Context, data []byte) (request model.EmbeddingRequest, err error)

func (*General) ConvTextEmbeddingsResponse

func (g *General) ConvTextEmbeddingsResponse(ctx context.Context, data []byte) (response model.EmbeddingResponse, err error)

func (*General) ConvVideoContentResponse

func (g *General) ConvVideoContentResponse(ctx context.Context, data []byte) (response model.VideoContentResponse, err error)

func (*General) ConvVideoCreateRequest

func (g *General) ConvVideoCreateRequest(ctx context.Context, request model.VideoCreateRequest) (data *bytes.Buffer, err error)

func (*General) ConvVideoJobResponse

func (g *General) ConvVideoJobResponse(ctx context.Context, data []byte) (response model.VideoJobResponse, err error)

func (*General) ConvVideoListResponse

func (g *General) ConvVideoListResponse(ctx context.Context, data []byte) (response model.VideoListResponse, err error)

func (*General) FileContent

func (g *General) FileContent(ctx context.Context, request model.FileContentRequest) (response model.FileContentResponse, err error)

func (*General) FileDelete

func (g *General) FileDelete(ctx context.Context, request model.FileDeleteRequest) (response model.FileResponse, err error)

func (*General) FileList

func (g *General) FileList(ctx context.Context, request model.FileListRequest) (response model.FileListResponse, err error)

func (*General) FileRetrieve

func (g *General) FileRetrieve(ctx context.Context, request model.FileRetrieveRequest) (response model.FileResponse, err error)

func (*General) FileUpload

func (g *General) FileUpload(ctx context.Context, request model.FileUploadRequest) (response model.FileResponse, err error)

func (*General) ImageEdits

func (g *General) ImageEdits(ctx context.Context, request model.ImageEditRequest) (response model.ImageResponse, err error)

func (*General) ImageGenerations

func (g *General) ImageGenerations(ctx context.Context, data []byte) (response model.ImageResponse, err error)

func (*General) TextEmbeddings

func (g *General) TextEmbeddings(ctx context.Context, data []byte) (response model.EmbeddingResponse, err error)

func (*General) VideoContent

func (g *General) VideoContent(ctx context.Context, request model.VideoContentRequest) (response model.VideoContentResponse, err error)

func (*General) VideoCreate

func (g *General) VideoCreate(ctx context.Context, request model.VideoCreateRequest) (response model.VideoJobResponse, err error)

func (*General) VideoCreateOfficial added in v2.3.0

func (g *General) VideoCreateOfficial(ctx context.Context, data []byte) (responseBytes []byte, err error)

func (*General) VideoDelete

func (g *General) VideoDelete(ctx context.Context, request model.VideoDeleteRequest) (response model.VideoJobResponse, err error)

func (*General) VideoDeleteOfficial added in v2.3.0

func (g *General) VideoDeleteOfficial(ctx context.Context, taskId string) (err error)

func (*General) VideoList

func (g *General) VideoList(ctx context.Context, request model.VideoListRequest) (response model.VideoListResponse, err error)

func (*General) VideoListOfficial added in v2.3.0

func (g *General) VideoListOfficial(ctx context.Context, params model.VolcVideoListReq) (responseBytes []byte, err error)

func (*General) VideoRemix

func (g *General) VideoRemix(ctx context.Context, request model.VideoRemixRequest) (response model.VideoJobResponse, err error)

func (*General) VideoRetrieve

func (g *General) VideoRetrieve(ctx context.Context, request model.VideoRetrieveRequest) (response model.VideoJobResponse, err error)

func (*General) VideoRetrieveOfficial added in v2.3.0

func (g *General) VideoRetrieveOfficial(ctx context.Context, taskId string) (responseBytes []byte, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL