Documentation ¶
Index ¶
- type ChatBot
- func (bot *ChatBot) CreateChatCompletion(ctx context.Context, message *model.Message, role model.Role) (*model.Message, error)
- func (bot *ChatBot) CreateChatCompletionStream(ctx context.Context, message *model.Message, role model.Role, ...) (*model.Message, error)
- func (bot *ChatBot) CreateCompletion(ctx context.Context, prompt *model.Message) (*model.Message, error)
- func (bot *ChatBot) CreateCompletionStream(ctx context.Context, message *model.Message, role model.Role, ...) (*model.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatBot ¶
type ChatBot struct { *robots.Robot Client contract.ChatBotClientInterface }
func NewChatBot ¶
func NewChatBot(client contract.ChatBotClientInterface) (*ChatBot, error)
func (*ChatBot) CreateChatCompletion ¶
func (bot *ChatBot) CreateChatCompletion(ctx context.Context, message *model.Message, role model.Role) (*model.Message, error)
SendMessage 向指定对话发送消息
func (*ChatBot) CreateChatCompletionStream ¶
Click to show internal directories.
Click to hide internal directories.