handler

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: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvAiProxyChatgpt4ModelId = "AI_PROXY_CHATGPT4_MODEL_ID"
)

Variables

This section is empty.

Functions

func HTTPError

func HTTPError(err error, code int) error

HTTPError todo: duplicate

Types

type AIFunction

type AIFunction struct {
	Log       logs.Logger
	OpenaiURL *url.URL
	ModelIds  map[string]string
}

func (*AIFunction) Apply

func (h *AIFunction) Apply(ctx context.Context, req *pb.ApplyRequest) (pbValue *structpb.Value, err error)

func (*AIFunction) GetSystemPrompt

func (h *AIFunction) GetSystemPrompt(ctx context.Context, req *pb.GetSystemPromptRequest) (pbValue *structpb.Value, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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