openai

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultModelChat = "gpt-4-1106-preview"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAI

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

func New

func New(key, model string) *OpenAI

func (*OpenAI) Ask

func (o *OpenAI) Ask(ctx context.Context, q string, s *schema.Schema) (string, error)

func (*OpenAI) AskQuery

func (o *OpenAI) AskQuery(ctx context.Context, q string, s *schema.Schema) (string, error)

func (*OpenAI) SetPromtTmpl

func (o *OpenAI) SetPromtTmpl(t string)

func (*OpenAI) SetQueryPromtTmpl

func (o *OpenAI) SetQueryPromtTmpl(t string)

Jump to

Keyboard shortcuts

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