Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Subscribe ¶
func Subscribe(s AsyncMessageService, topics *TopicConfig) (err error)
Types ¶
type AsyncMessageService ¶
type AsyncMessageService interface {
UpdateWuKongTask(*repository.WuKongResp) error
CreateWuKongTask(*domain.WuKongRequest) error
}
func NewAsyncMessageService ¶
func NewAsyncMessageService( repo repository.AsyncTask, ) AsyncMessageService
type AsyncService ¶
type AsyncService interface {
AsyncWuKong(taskType string, time int64) error
AsyncWuKong4Img(taskType string, time int64) error
}
func NewAsyncService ¶
func NewAsyncService( bigmodel bigmodel.BigModel, pool pool.Pool, repo repository.AsyncTask, ) AsyncService
type TaskService ¶
type TaskService interface {
GetWaitingTaskRank(types.Account, commondomain.Time, []string) (int, error)
GetLastFinishedTask(types.Account, []string) (repository.WuKongResp, error)
}
func NewTaskService ¶
func NewTaskService( repo repository.AsyncTask, ) TaskService
type TopicConfig ¶
type TopicConfig struct {
BigModelFinished string `json:"bigmodel_finished" required:"true"`
InferenceStart string `json:"inference_start"`
InferenceError string `json:"inference_error"`
InferenceAsyncStart string `json:"inference_async_start"`
InferenceAsyncFinish string `json:"inference_async_finish"`
}
type WuKongCmd ¶
type WuKongCmd struct {
User types.Account
Desc bigmodeldomain.WuKongPictureDesc
Style string
}
Click to show internal directories.
Click to hide internal directories.