chatfuncs

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedCurrencies = []string{
	"AUD", "AZN", "GBP",
	"AMD", "BYN", "BGN",
	"BRL", "HUF", "VND",
	"HKD", "GEL", "DKK",
	"AED", "USD", "EUR",
	"EGP", "INR", "IDR",
	"KZT", "CAD", "QAR",
	"KGS", "CNY", "MDL",
	"NZD", "NOK", "PLN",
	"RON", "XDR", "SGD",
	"TJS", "THB", "TRY",
	"TMT", "UZS", "UAH",
	"CZK", "SEK", "CHF",
	"RSD", "ZAR", "KRW",
	"JPY",
}
View Source
var SupportedUnits = []string{
	"m", "cm", "mm", "km", "ft", "in", "yd", "mi",
	"kg", "g", "mg", "t", "lb", "oz",
	"m/s", "km/h", "ft/s", "mph", "kn", "mach",
	"m2", "cm2", "mm2", "km2", "ft2", "in2", "yd2", "mi2",
	"m3", "cm3", "mm3", "km3", "ft3", "in3", "yd3", "mi3",
	"l", "ml", "gal", "qt", "pt", "cup", "fl oz",
	"kg/m3", "g/cm3", "mg/mm3", "t/km3", "lb/ft3", "oz/in3", "oz/yd3", "t/m3",
}

Functions

func GetExchangeRate

func GetExchangeRate(from string, to string) (float64, error)

func NewCurrencyConvert

func NewCurrencyConvert() functions.ChatFunctionDefinition

func NewDoSQLQuery

func NewDoSQLQuery(db *gorm.DB) functions.ChatFunctionDefinition

func NewUnitConversion

func NewUnitConversion(db *gorm.DB) functions.ChatFunctionDefinition

func UnitConversion

func UnitConversion(amount float64, from string, to string) (float64, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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