Documentation ¶
Index ¶
- func RegisterAliyun(i IAliyun)
- func RegisterBaidu(i IBaidu)
- func RegisterChat(i IChat)
- func RegisterCommon(i ICommon)
- func RegisterFile(i IFile)
- func RegisterMidjourney(i IMidjourney)
- func RegisterOpenAI(i IOpenAI)
- func RegisterRobot(i IRobot)
- func RegisterSession(i ISession)
- func RegisterUser(i IUser)
- func RegisterXfyun(i IXfyun)
- type IAliyun
- type IBaidu
- type IChat
- type ICommon
- type IFile
- type IMidjourney
- type IOpenAI
- type IRobot
- type ISession
- type IUser
- type IXfyun
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAliyun ¶
func RegisterAliyun(i IAliyun)
func RegisterBaidu ¶
func RegisterBaidu(i IBaidu)
func RegisterChat ¶
func RegisterChat(i IChat)
func RegisterCommon ¶
func RegisterCommon(i ICommon)
func RegisterFile ¶
func RegisterFile(i IFile)
func RegisterMidjourney ¶
func RegisterMidjourney(i IMidjourney)
func RegisterOpenAI ¶
func RegisterOpenAI(i IOpenAI)
func RegisterRobot ¶
func RegisterRobot(i IRobot)
func RegisterSession ¶
func RegisterSession(i ISession)
func RegisterUser ¶
func RegisterUser(i IUser)
func RegisterXfyun ¶
func RegisterXfyun(i IXfyun)
Types ¶
type IAliyun ¶
type IBaidu ¶
type IChat ¶
type ICommon ¶
type ICommon interface { GetMessageContext(ctx context.Context, robot *model.Robot, message *model.Message) []string SaveMessageContext(ctx context.Context, robot *model.Robot, message *model.Message, value any) error ClearMessageContext(ctx context.Context, robot *model.Robot, message *model.Message) (int64, error) TrimMessageContext(ctx context.Context, robot *model.Robot, message *model.Message, start, stop int64) error Translate(ctx context.Context, text string, retry ...int) (res string) }
type IFile ¶
type IMidjourney ¶
type IMidjourney interface {
Image(ctx context.Context, robot *model.Robot, message *model.Message) (imageInfo *model.Image, err error)
}
func Midjourney ¶
func Midjourney() IMidjourney
type IOpenAI ¶
type IRobot ¶
type IRobot interface { GetRobotByUserId(ctx context.Context, userId int) (*model.Robot, error) GetRobotsByUserIds(ctx context.Context, userId ...int) ([]*model.Robot, error) ClearMessageContext(ctx context.Context, robot *model.Robot, message *model.Message) (int64, error) IsNeedRobotReply(ctx context.Context, userId ...int) ([]*model.Robot, bool) Text(ctx context.Context, robot *model.Robot, message *model.Message) (*model.Text, error) Image(ctx context.Context, robot *model.Robot, message *model.Message) (*model.Image, error) }
type ISession ¶
Click to show internal directories.
Click to hide internal directories.