jimeng

package
v1.0.4-preview.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: AGPL-3.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// 即梦限制单个文件最大4.7MB https://www.volcengine.com/docs/85621/1747301
	MaxFileSize int64 = 4*1024*1024 + 700*1024 // 4.7MB (4MB + 724KB)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskAdaptor

type TaskAdaptor struct {
	taskcommon.BaseBilling
	ChannelType int
	// contains filtered or unexported fields
}

func (*TaskAdaptor) BuildRequestBody

func (a *TaskAdaptor) BuildRequestBody(c *gin.Context, info *relaycommon.RelayInfo) (io.Reader, error)

func (*TaskAdaptor) BuildRequestHeader

func (a *TaskAdaptor) BuildRequestHeader(c *gin.Context, req *http.Request, info *relaycommon.RelayInfo) error

BuildRequestHeader sets required headers.

func (*TaskAdaptor) BuildRequestURL

func (a *TaskAdaptor) BuildRequestURL(info *relaycommon.RelayInfo) (string, error)

BuildRequestURL constructs the upstream URL.

func (*TaskAdaptor) ConvertToOpenAIVideo

func (a *TaskAdaptor) ConvertToOpenAIVideo(originTask *model.Task) ([]byte, error)

func (*TaskAdaptor) DoRequest

func (a *TaskAdaptor) DoRequest(c *gin.Context, info *relaycommon.RelayInfo, requestBody io.Reader) (*http.Response, error)

DoRequest delegates to common helper.

func (*TaskAdaptor) DoResponse

func (a *TaskAdaptor) DoResponse(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo) (taskID string, taskData []byte, taskErr *dto.TaskError)

DoResponse handles upstream response, returns taskID etc.

func (*TaskAdaptor) FetchTask

func (a *TaskAdaptor) FetchTask(baseUrl, key string, body map[string]any, proxy string) (*http.Response, error)

FetchTask fetch task status

func (*TaskAdaptor) GetChannelName

func (a *TaskAdaptor) GetChannelName() string

func (*TaskAdaptor) GetModelList

func (a *TaskAdaptor) GetModelList() []string

func (*TaskAdaptor) Init

func (a *TaskAdaptor) Init(info *relaycommon.RelayInfo)

func (*TaskAdaptor) ParseTaskResult

func (a *TaskAdaptor) ParseTaskResult(respBody []byte) (*relaycommon.TaskInfo, error)

func (*TaskAdaptor) ValidateRequestAndSetAction

func (a *TaskAdaptor) ValidateRequestAndSetAction(c *gin.Context, info *relaycommon.RelayInfo) (taskErr *dto.TaskError)

ValidateRequestAndSetAction parses body, validates fields and sets default action.

Jump to

Keyboard shortcuts

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