Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatBotClientInterface ¶
type ChatBotClientInterface interface { // GetConfig 获取基本配置 GetConfig() *rcconfig.ChatBot // SetConfig 设置基本配置 SetConfig(config *rcconfig.ChatBot) CreateCompletion(ctx context.Context, message *model.Message) (*model.Message, error) CreateCompletionStream(ctx context.Context, message *model.Message, role model.Role, processStreamData func(data string, status model2.ChatStatus) error) (*model.Message, error) CreateChatCompletion(ctx context.Context, message *model.Message, role model.Role) (*model.Message, error) CreateChatCompletionStream(ctx context.Context, message *model.Message, role model.Role, processStreamData func(data string, status model2.ChatStatus) error) (*model.Message, error) // SetTemperature 设置模型温度 SetTemperature(temperature float64) error // SetMaxAnswerLength 设置回答的最大长度 SetMaxAnswerLength(length int) error }
ChatBotClientInterface 是与 ChatBot 客户端交互的接口
Click to show internal directories.
Click to hide internal directories.