Documentation
¶
Index ¶
- func Contains(slice []string, item string) bool
- func Input(prompt string) (string, error)
- func InputWithColor(prompt, cssColorCode string) (string, error)
- func LoadFile(filePath string) (string, error)
- func PrintChatCompletionStream(stream *openai.ChatCompletionStream) (string, error)
- func PrintColoredText(text, cssColorCode string)
- func PrintColoredTextLn(text, cssColorCode string)
- func ReverseSlice[T any](s []T)
- func SimpleTokenize(text string) []string
- func SortByAverage(fragments []memory.MemoryFragment) []memory.MemoryFragment
- func SortByScore(fragments []memory.MemoryFragment) []memory.MemoryFragment
- func WriteFile(filePath string, contents string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InputWithColor ¶
func PrintColoredText ¶
func PrintColoredText(text, cssColorCode string)
PrintColoredText prints the given text in the specified CSS color code using fmt.Print.
func PrintColoredTextLn ¶
func PrintColoredTextLn(text, cssColorCode string)
PrintColoredTextLn prints the given text in the specified CSS color code using fmt.Println.
func ReverseSlice ¶
func ReverseSlice[T any](s []T)
ReverseSlice reverses the order of the elements in a slice of any type.
func SimpleTokenize ¶
func SortByAverage ¶
func SortByAverage(fragments []memory.MemoryFragment) []memory.MemoryFragment
func SortByScore ¶
func SortByScore(fragments []memory.MemoryFragment) []memory.MemoryFragment
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.