functions

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GetFunctionDefinitions

func GetFunctionDefinitions(genres []string) []openai.FunctionDefinition

func SetAcousticness

func SetAcousticness(acousticness *utils.Info[float64], value float64)

func SetDanceability

func SetDanceability(danceabilityInfo *utils.Info[float64], value float64)

func SetEnergy

func SetEnergy(energy *utils.Info[float64], value float64)

func SetGenres

func SetGenres(genresInfo *utils.Info[[]string], value []string)

func SetInstrumentalness

func SetInstrumentalness(instrumentalness *utils.Info[float64], value float64)

func SetLiveness

func SetLiveness(liveness *utils.Info[float64], value float64)

func SetPopularity

func SetPopularity(popularity *utils.Info[int], value int)

func SetSpeechiness

func SetSpeechiness(speechiness *utils.Info[float64], value float64)

func SetValence

func SetValence(valence *utils.Info[float64], value float64)

Types

type Call

type Call struct {
	Name string `json:"name"`
}

type FunctionName

type FunctionName string
const (
	SetGenresFunctionName           FunctionName = "setGenres"
	SetDanceabilityFunctionName     FunctionName = "setDanceability"
	SetValenceFunctionName          FunctionName = "setValence"
	SetPopularityFunctionName       FunctionName = "setPopularity"
	SetAcousticnessFunctionName     FunctionName = "setAcousticness"
	SetEnergyFunctionName           FunctionName = "setEnergy"
	SetInstrumentalnessFunctionName FunctionName = "setInstrumentalness"
	SetLivenessFunctionaName        FunctionName = "setLiveness"
	SetSpeechinessFunctionName      FunctionName = "setSpeechiness"

	ObjectType = "object"
	StringType = "string"
	NumberType = "number"
)

type Parameters

type Parameters struct {
	Type       string   `json:"type"`
	Properties any      `json:"properties"`
	Required   []string `json:"required"`
}

type Property

type Property struct {
	Type        string `json:"type,omitempty"`
	Description string `json:"description,omitempty"`
}

type QualitativeProperty

type QualitativeProperty struct {
	QualitativeValue Property `json:"qualitative_value,omitempty"`
}

type QuantitativeProperty

type QuantitativeProperty struct {
	QuantitativeValue Property `json:"quantitative_value,omitempty"`
}

Jump to

Keyboard shortcuts

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