dispatcher

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher struct {
	// contains filtered or unexported fields
}

func New

func New(invoker *invoke.Invoker, c kclient.Client, gptscriptClient *gptscript.GPTScript, gatewayClient *client.Client, postgresDSN string) *Dispatcher

func (*Dispatcher) GetAuthProviderConfigEnv added in v0.12.0

func (d *Dispatcher) GetAuthProviderConfigEnv(ctx context.Context, gptscriptClient *gptscript.GPTScript, namespace, authProviderName, envName string) (string, error)

GetAuthProviderConfigEnv returns the value of the specified environment variable from the given auth providers config.

func (*Dispatcher) GetConfiguredAuthProvider added in v0.15.0

func (d *Dispatcher) GetConfiguredAuthProvider(ctx context.Context) (string, error)

func (*Dispatcher) ModelsForProvider added in v0.8.0

func (d *Dispatcher) ModelsForProvider(ctx context.Context, gptClient *gptscript.GPTScript, modelProviderNamespace, modelProviderName string) (*openai.ModelsList, error)

func (*Dispatcher) ModelsForProviderWithEnv added in v0.8.0

func (d *Dispatcher) ModelsForProviderWithEnv(ctx context.Context, gptClient *gptscript.GPTScript, modelProviderNamespace, modelProviderName string, env map[string]string) (*openai.ModelsList, error)

func (*Dispatcher) ScanFile added in v0.8.0

func (d *Dispatcher) ScanFile(ctx context.Context, gptClient *gptscript.GPTScript, contents []byte) (bool, error)

func (*Dispatcher) StopAuthProvider added in v0.5.0

func (d *Dispatcher) StopAuthProvider(namespace, authProviderName string)

func (*Dispatcher) StopFileScannerProvider added in v0.8.0

func (d *Dispatcher) StopFileScannerProvider(namespace, fileScannerProviderName string)

func (*Dispatcher) StopModelProvider

func (d *Dispatcher) StopModelProvider(namespace, modelProviderName string)

func (*Dispatcher) TransformRequest

func (d *Dispatcher) TransformRequest(u url.URL, credEnv map[string]string) func(req *http.Request)

func (*Dispatcher) URLForAuthProvider added in v0.5.0

func (d *Dispatcher) URLForAuthProvider(ctx context.Context, gptClient *gptscript.GPTScript, namespace, authProviderName string) (url.URL, error)

func (*Dispatcher) URLForModelProvider

func (d *Dispatcher) URLForModelProvider(ctx context.Context, gptClient *gptscript.GPTScript, namespace, modelProviderName string) (url.URL, error)

Jump to

Keyboard shortcuts

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