Documentation
¶
Index ¶
- func FindFirstSystemMessage(history []structs.Message) (structs.Message, error)
- func GetFirstSystemMessage(basename string) (string, error)
- func GetFirstSystemMessageStruct(basename string) (structs.Message, error)
- func GetMessagesExcludingSystem(basename string) ([]structs.Message, error)
- func GetMessagesFromFilename(basename string) ([]structs.Message, error)
- func GetSettingFromFilename(basename, settingName string) (interface{}, error)
- func LoadPrompts() error
- type Prompt
- type PromptFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFirstSystemMessage ¶
FindFirstSystemMessage 从消息列表中查找第一条角色为 "system" 的消息
func GetFirstSystemMessage ¶
返回第一条 "system" 角色的消息文本 GetFirstSystemMessage returns the first message with role "system", randomly selecting if split by ||
func GetFirstSystemMessageStruct ¶
GetFirstSystemMessage returns the first message that is of "system" role.
func GetMessagesExcludingSystem ¶
返回除了 "system" 角色之外的所有消息 GetMessagesExcludingSystem returns a list of messages that are not of "system" role, randomly selecting from options separated by "||" in prompt contents.
func GetMessagesFromFilename ¶
GetMessagesFromFilename returns a list of messages, each potentially with randomized content if '||' is used in prompts
func GetSettingFromFilename ¶
GetSettingFromFilename 用于获取配置文件中的特定设置
Types ¶
type PromptFile ¶
Click to show internal directories.
Click to hide internal directories.