Documentation
¶
Index ¶
- Constants
- Variables
- func NewAdvancedChat() (*interfaces.AdvancedChat, error)
- func NewAdvancedChatStream() (*interfaces.AdvancedChatStream, error)
- func NewAdvancedChatStreamWithOptions(opt *PersonaOptions) (*interfaces.AdvancedChatStream, error)
- func NewAdvancedChatWithOptions(opt *PersonaOptions) (*interfaces.AdvancedChat, error)
- func NewSimpleChat() (*interfaces.SimpleChat, error)
- func NewSimpleChatWithOptions(opt *PersonaOptions) (*interfaces.SimpleChat, error)
- func NewStandardChat() (*interfaces.StandardChat, error)
- func NewStandardChatWithOptions(opt *PersonaOptions) (*interfaces.StandardChat, error)
- type PersonaOptions
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)
Click to show internal directories.
Click to hide internal directories.