openai

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendConfig

type BackendConfig struct {
	BaseUrl    string `yaml:"base_url"`
	APIKey     string `yaml:"api_key"`
	APIVersion string `yaml:"api_version"`
	BackendURL *url.URL
}

type OpenAIEngine

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

func NewOpenAIEngineWithConfig added in v0.1.2

func NewOpenAIEngineWithConfig(configStr string) (*OpenAIEngine, error)

func (*OpenAIEngine) IsAllowedPath added in v0.1.2

func (e *OpenAIEngine) IsAllowedPath(path string) bool

func (*OpenAIEngine) ModifyRequest

func (e *OpenAIEngine) ModifyRequest(r *http.Request)

func (*OpenAIEngine) Name

func (e *OpenAIEngine) Name() string

func (*OpenAIEngine) ResponseCallback added in v0.1.5

func (e *OpenAIEngine) ResponseCallback(resp *http.Response, body io.Reader)

Jump to

Keyboard shortcuts

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