handler

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func User

func User(id string) string

Types

type Ai

type Ai struct {
	Client *openai.Client
}

func New

func New() *Ai

Return a new handler

func (*Ai) Chat

func (e *Ai) Chat(ctx context.Context, req *pb.ChatRequest, rsp *pb.ChatResponse) error

func (*Ai) Complete

func (e *Ai) Complete(ctx context.Context, req *pb.CompleteRequest, rsp *pb.CompleteResponse) error

func (*Ai) Edit

func (e *Ai) Edit(ctx context.Context, req *pb.EditRequest, rsp *pb.EditResponse) error

func (*Ai) Generate

func (e *Ai) Generate(ctx context.Context, req *pb.GenerateRequest, rsp *pb.GenerateResponse) error

func (*Ai) Moderate

func (e *Ai) Moderate(ctx context.Context, req *pb.ModerateRequest, rsp *pb.ModerateResponse) error

func (*Ai) Stream added in v1.7.0

func (e *Ai) Stream(ctx context.Context, req *pb.StreamRequest, stream pb.Ai_StreamStream) error

Jump to

Keyboard shortcuts

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