Documentation
¶
Index ¶
Constants ¶
View Source
const ( ChatMessageRoleSystem = openai.ChatMessageRoleSystem ChatMessageRoleUser = openai.ChatMessageRoleUser ChatMessageRoleAssistant = openai.ChatMessageRoleAssistant )
View Source
const ( SkillTypeDefault SkillType = iota SkillTypeGeneric = 1 SkillTypeExpert = 2 SkillTypeDAN = 991 SkillTypeSTAN = 992 SkillTypeDUDE = 993 SkillTypeJailBreak = 994 SkillTypeMongo = 995 SkillTypeCustom = 9999 )
View Source
const ( // https://www.reddit.com/r/ChatGPT/comments/10vinun/presenting_dan_60 DANPrompt string = `` /* 1935-byte string literal not displayed */ STANPrompt string = `` /* 1340-byte string literal not displayed */ // From "Sape", via email, Re: my YouTube video. DUDEPrompt string = `` /* 2168-byte string literal not displayed */ JailBreakPrompt string = `` /* 4191-byte string literal not displayed */ MongoPrompt string = `` /* 685-byte string literal not displayed */ )
Variables ¶
View Source
var ( // ErrInvalidInput required input was not found ErrInvalidInput = errors.New("required input was not found") // ErrInitAlready previously been initialized ErrInitAlready = errors.New("previously been initialized") // ErrEmptyChoices no valid choices ErrEmptyChoices = errors.New("no valid choices") )
Functions ¶
This section is empty.
Types ¶
type AdvancedChat ¶
type AdvancedChat interface { Init(level SkillType, model string) error InitWithProvided(model string, previous []CompletionMessage) error DynamicInit(model string, previous []CompletionMessage) error GetConversation() ([]CompletionMessage, error) EditConversation(index int, statement string) ([]CompletionChoice, error) Query(ctx context.Context, role, statement string) ([]CompletionChoice, error) AddDirective(directives string) error AddUserContext(text string) error CommitResponse(index int) error }
type AdvancedChatStream ¶ added in v0.2.0
type AdvancedChatStream interface { Init(level SkillType, model string) error InitWithProvided(model string, previous []CompletionMessage) error DynamicInit(model string, previous []CompletionMessage) error GetConversation() ([]CompletionMessage, error) EditConversation(index int, statement string) (*StreamingCompletion, error) Query(ctx context.Context, statement string) (*StreamingCompletion, error) AddDirective(directives string) error AddUserContext(text string) error }
type CompletionChoice ¶ added in v0.2.1
type CompletionChoice struct { Index int Message *CompletionMessage }
type CompletionMessage ¶ added in v0.2.1
shared
type SimpleChat ¶
type SimpleChat interface { Init(level SkillType, model string) error Query(ctx context.Context, statement string) (string, error) }
rest interfaces
type StandardChat ¶ added in v0.2.0
type StandardChatStream ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.