Documentation
¶
Index ¶
- type ChatHistory
- func (u *ChatHistory) Clear()
- func (u *ChatHistory) FromJSON(s string) error
- func (u *ChatHistory) Len() int
- func (u *ChatHistory) MarshalJSON() ([]byte, error)
- func (u *ChatHistory) Slice() []*llms.Message
- func (u *ChatHistory) Store(msg *llms.Message) bool
- func (u *ChatHistory) StoreMany(msgs ...*llms.Message)
- func (u *ChatHistory) ToJSON() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatHistory ¶
type ChatHistory struct {
// contains filtered or unexported fields
}
ChatHistory 一个不重复的struct切片结构
func NewChatHistory ¶
func NewChatHistory(context int) *ChatHistory
func (*ChatHistory) Clear ¶
func (u *ChatHistory) Clear()
func (*ChatHistory) FromJSON ¶
func (u *ChatHistory) FromJSON(s string) error
func (*ChatHistory) Len ¶
func (u *ChatHistory) Len() int
func (*ChatHistory) MarshalJSON ¶
func (u *ChatHistory) MarshalJSON() ([]byte, error)
func (*ChatHistory) Slice ¶
func (u *ChatHistory) Slice() []*llms.Message
func (*ChatHistory) StoreMany ¶
func (u *ChatHistory) StoreMany(msgs ...*llms.Message)
func (*ChatHistory) ToJSON ¶
func (u *ChatHistory) ToJSON() string
Click to show internal directories.
Click to hide internal directories.