personas

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultPort int = 443
)

Variables

View Source
var (
	// ErrInvalidInput required input was not found
	ErrInvalidInput = errors.New("required input was not found")

	// ErrNotFoundOpenAiKey openai key not found
	ErrNotFoundOpenAiKey = errors.New("openai key not found")

	// ErrInvalidOpenAiClient invalid open ai client
	ErrInvalidOpenAiClient = errors.New("invalid open ai client")
)

Functions

func NewAdvancedChat

func NewAdvancedChat() (*interfaces.AdvancedChat, error)

func NewAdvancedChatStream added in v0.2.0

func NewAdvancedChatStream() (*interfaces.AdvancedChatStream, error)

func NewAdvancedChatStreamWithOptions added in v0.2.0

func NewAdvancedChatStreamWithOptions(opt *PersonaOptions) (*interfaces.AdvancedChatStream, error)

func NewAdvancedChatWithOptions

func NewAdvancedChatWithOptions(opt *PersonaOptions) (*interfaces.AdvancedChat, error)

func NewSimpleChat

func NewSimpleChat() (*interfaces.SimpleChat, error)

func NewSimpleChatWithOptions

func NewSimpleChatWithOptions(opt *PersonaOptions) (*interfaces.SimpleChat, error)

func NewStandardChat added in v0.2.0

func NewStandardChat() (*interfaces.StandardChat, error)

func NewStandardChatWithOptions added in v0.2.0

func NewStandardChatWithOptions(opt *PersonaOptions) (*interfaces.StandardChat, error)

Types

type PersonaOptions

type PersonaOptions struct {
	*openai.ClientConfig

	DisableHostVerify bool
}

PersonaOptions for the main HTTP endpoint

func DefaultConfig

func DefaultConfig(OpenAiUrl, OpenAiApiKey string) (*PersonaOptions, error)

Directories

Path Synopsis
rest
stream

Jump to

Keyboard shortcuts

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