utilities

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcatWords

func ConcatWords(joiner []byte, words ...[]byte) string

This is a fast approach for concatenating strings in Go strings.Join is optimized for this purpose and generally faster than manual concatenation

func CustomFormat

func CustomFormat(s []byte, kwargs map[string][]byte) []byte

CustomFormat is a placeholder for your existing CustomFormat function Implement this function according to your needs

func GetCurrentDateTimeWithTimeZoneShift added in v0.0.4

func GetCurrentDateTimeWithTimeZoneShift(userTimeZone string) (string, int, int, int, string, string)

GetCurrentDateTime returns the current date and time details in a different format. It returns six values: the current date in "YYYY-MM-DD" format, the current year, the current month, the current day, the current day of the week, and the current time in "03:04 PM MST" format. Returns: - string: Current date in "YYYY-MM-DD" format. - int: Current year. - int: Current month as an integer. - int: Current day of the month. - string: Current day of the week. - string: Current time in "03:04 PM MST" format.

func PrintRainbow added in v0.0.4

func PrintRainbow(message string)

Helper function to print rainbow text

func Printer

func Printer(tag string, message string, color string)

Printer formats and prints a message with specified color and tag. It now supports an expanded set of colors based on the ANSI 256-color palette. Args: - message string: The message to be color formatted - tag string: The color code tag - color string: The color to be used (now supports extended color codes) Returns: - Prints the formatted message to log output

Types

type Prompts

type Prompts struct {
	ChatPrompt string `yaml:"chat_prompt"`
}

func LoadPrompts

func LoadPrompts(filename string, promptFS embed.FS) (*Prompts, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL