context

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "context-audio"
)

Variables

This section is empty.

Functions

func New

func New(configJSON json.RawMessage) (reverseproxy.Filter, error)

Types

type Config

type Config struct {
	MaxAudioSizeStr         string            `json:"maxAudioSize" yaml:"maxAudioSize"`
	MaxAudioSize            bytesize.ByteSize `json:"-" yaml:"-"`
	SupportedAudioFileTypes []string          `json:"supportedAudioFileTypes" yaml:"supportedAudioFileTypes"`
	DefaultOpenAIAudioModel string            `json:"defaultOpenAIAudioModel" yaml:"defaultOpenAIAudioModel"`
}

type Context

type Context struct {
	Config *Config
}

func (*Context) OnRequest

func (f *Context) OnRequest(ctx context.Context, w http.ResponseWriter, infor reverseproxy.HttpInfor) (signal reverseproxy.Signal, err error)

Jump to

Keyboard shortcuts

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