openai

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParameterLayer

type ParameterLayer struct {
	*layers.ParameterLayerImpl `yaml:",inline"`
}

func NewParameterLayer

func NewParameterLayer(options ...layers.ParameterLayerOptions) (*ParameterLayer, error)

type Settings

type Settings struct {
	// How many choice to create for each prompt
	N *int `yaml:"n" glazed.parameter:"openai-n"`
	// PresencePenalty to use
	PresencePenalty *float64 `yaml:"presence_penalty,omitempty" glazed.parameter:"openai-presence-penalty"`
	// FrequencyPenalty to use
	FrequencyPenalty *float64 `yaml:"frequency_penalty,omitempty" glazed.parameter:"openai-frequency-penalty"`
	// LogitBias to use
	// TODO(manuel, 2023-03-28) Properly load logit bias
	// See https://github.com/go-go-golems/geppetto/issues/48
	LogitBias map[string]string `yaml:"logit_bias,omitempty" glazed.parameter:"openai-logit-bias"`
	BaseURL   *string           `yaml:"base_url,omitempty" glazed.parameter:"openai-base-url"`
	APIKey    *string           `yaml:"api_key,omitempty" glazed.parameter:"openai-api-key"`
}

func NewSettings

func NewSettings() *Settings

func NewSettingsFromParsedLayer

func NewSettingsFromParsedLayer(layer *layers.ParsedLayer) (*Settings, error)

func (*Settings) Clone

func (s *Settings) Clone() *Settings

func (*Settings) UpdateFromParsedLayer

func (s *Settings) UpdateFromParsedLayer(layer *layers.ParsedLayer) error

Jump to

Keyboard shortcuts

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