Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultAiRole = "AI" DefaultHumanRole = "Human" DefaultCharacter = []string{"helpful", "creative", "clever", "friendly", "lovely", "talkative"} DefaultBackground = "The following is a conversation with AI assistant. The assistant is %s" DefaultPreset = "\n%s: Cześć!\n%s: Jestem asystentem AI, co mogę dla Ciebie zrobić?" )
View Source
var OverMaxQuestionLength = errors.New("maximum question length exceeded")
OverMaxQuestionLength 超过最大问题长度
View Source
var OverMaxSequenceTimes = errors.New("maximum conversation times exceeded")
OverMaxSequenceTimes 超过最大对话时间
View Source
var OverMaxTextLength = errors.New("maximum text length exceeded")
OverMaxTextLength 超过最大文本长度
Functions ¶
This section is empty.
Types ¶
type ChatContext ¶
type ChatContext struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext() *ChatContext
func (*ChatContext) GetMaxSeqTimes ¶
func (c *ChatContext) GetMaxSeqTimes() int
func (*ChatContext) SetAiRole ¶
func (c *ChatContext) SetAiRole(role string)
func (*ChatContext) SetBackground ¶
func (c *ChatContext) SetBackground(background string)
func (*ChatContext) SetHumanRole ¶
func (c *ChatContext) SetHumanRole(role string)
func (*ChatContext) SetMaxSeqTimes ¶
func (c *ChatContext) SetMaxSeqTimes(times int)
func (*ChatContext) SetPreset ¶
func (c *ChatContext) SetPreset(preset string)
type ChatGPT ¶
type ChatGPT struct { ChatContext *ChatContext // contains filtered or unexported fields }
func (*ChatGPT) ChatWithContext ¶
func (*ChatGPT) GetDoneChan ¶
func (c *ChatGPT) GetDoneChan() chan struct{}
func (*ChatGPT) SetMaxQuestionLen ¶
Click to show internal directories.
Click to hide internal directories.