Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoKey = fmt.Errorf("请先私聊机器人配置apiKey\n指令:set chatgpt apikey __(多个key用;符号隔开)\napiKey获取请到https://beta.openai.com获取") ErrMaxTokens = errors.New("OpenAi免费上下文长度限制为4097个词组,您的上下文长度已超出限制") )
View Source
var SystemRole = ordermap.NewOrderMap()
Functions ¶
Types ¶
type ApiKey ¶ added in v1.0.11
type ApiKey struct {
Key string `gorm:"column:key;index"`
}
ApiKey 表名:apikey,存放openai key
type ChatRoom ¶ added in v1.4.7
type ChatRoom struct {
// contains filtered or unexported fields
}
ChatRoom chatRoomCtx -> ChatRoom => 维系每个人的上下文
type GptModel ¶ added in v1.2.10
type GptModel struct { Model string `gorm:"column:model"` MaxTokens int `gorm:"column:max_tokens"` Temperature float64 `gorm:"column:temperature"` TopP float64 `gorm:"column:top_p"` PresencePenalty float64 `gorm:"column:presence_penalty"` FrequencyPenalty float64 `gorm:"column:frequency_penalty"` ImageSize string `gorm:"column:image_size"` }
GptModel 表名:gptmodel,存放gpt模型相关配置参数
type SystemRoles ¶ added in v1.5.4
SystemRoles 表名:roles,存放系统角色
Click to show internal directories.
Click to hide internal directories.