Documentation
¶
Index ¶
- Constants
- type ChatBot
- func (bot *ChatBot) Ask(question string) bool
- func (bot *ChatBot) CheckConnectivity() bool
- func (bot *ChatBot) Close(exit bool)
- func (bot *ChatBot) CommandProcessor(original_msg string, arr_cmd []string) (string, bool, error)
- func (bot *ChatBot) Run()
- func (bot *ChatBot) Say(msg string, need_dump bool)
- func (bot *ChatBot) ShakeHands() (string, error)
- type ChatGPTCLient
- func (c *ChatGPTCLient) CreateChatCompletion(ctx context.Context, request gpt3.ChatCompletionRequest) (response gpt3.ChatCompletionResponse, err error)
- func (c *ChatGPTCLient) UserLogin() (string, error)
- func (c *ChatGPTCLient) UserLogout() (string, error)
- func (c *ChatGPTCLient) UserRegistration(email string, endpoint_url string) (string, error)
- type FilePlugin
- type LivePrefixState
- type Plugin
- type PluginManager
- type WebSummaryPlugin
Constants ¶
View Source
const ( // execute host command on local machine Ask suggestionType = iota // translate text Translate // data from web page contents Web // data from file contents File // execute host command on local machine Cmd // clear all conversation history Clear // Config system setting Config // Reset suggestion Reset // Quit suggestion Quit // Others is key for various arbitrary suggestions Others )
View Source
const PLUGIN_NAME_FILE_CONTENT = "file-content"
View Source
const PLUGIN_NAME_FILE_SUMMARY = "file-summary"
View Source
const PLUGIN_NAME_FILE_TRANSLATE_CN = "file-translate-cn"
View Source
const PLUGIN_NAME_FILE_TRANSLATE_EN = "file-translate-en"
View Source
const PLUGIN_NAME_FILE_TRANSLATE_JP = "file-translate-jp"
View Source
const PLUGIN_NAME_WEB_CONTENT = "web-content"
View Source
const PLUGIN_NAME_WEB_SUMMARY = "web-summary"
View Source
const PLUGIN_NAME_WEB_TRANSLATE_CN = "web-translate-cn"
View Source
const PLUGIN_NAME_WEB_TRANSLATE_EN = "web-translate-en"
View Source
const PLUGIN_NAME_WEB_TRANSLATE_JP = "web-translate-jp"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatBot ¶
type ChatBot struct {
// contains filtered or unexported fields
}
func NewChatbot ¶
func (*ChatBot) CheckConnectivity ¶
func (*ChatBot) CommandProcessor ¶
func (*ChatBot) ShakeHands ¶
type ChatGPTCLient ¶
func (*ChatGPTCLient) CreateChatCompletion ¶
func (c *ChatGPTCLient) CreateChatCompletion( ctx context.Context, request gpt3.ChatCompletionRequest, ) (response gpt3.ChatCompletionResponse, err error)
CreateChatCompletion — API call to Create a completion for the chat message.
func (*ChatGPTCLient) UserLogin ¶
func (c *ChatGPTCLient) UserLogin() (string, error)
func (*ChatGPTCLient) UserLogout ¶
func (c *ChatGPTCLient) UserLogout() (string, error)
func (*ChatGPTCLient) UserRegistration ¶
func (c *ChatGPTCLient) UserRegistration(email string, endpoint_url string) (string, error)
type FilePlugin ¶
type FilePlugin struct {
// contains filtered or unexported fields
}
func (*FilePlugin) Close ¶
func (*FilePlugin) Close() error
func (*FilePlugin) Open ¶
func (plugin *FilePlugin) Open() error
type LivePrefixState ¶
func (*LivePrefixState) ChangeLivePrefix ¶
func (lps *LivePrefixState) ChangeLivePrefix() (string, bool)
func (*LivePrefixState) InputModePadding ¶
func (lps *LivePrefixState) InputModePadding(cmds string) bool
func (*LivePrefixState) ResetInputMode ¶
func (lps *LivePrefixState) ResetInputMode()
type PluginManager ¶
type PluginManager struct {
// contains filtered or unexported fields
}
func NewPluginManager ¶
func NewPluginManager() *PluginManager
func (*PluginManager) AddPlugin ¶
func (pm *PluginManager) AddPlugin(p Plugin)
func (*PluginManager) Close ¶
func (pm *PluginManager) Close() error
func (*PluginManager) Open ¶
func (pm *PluginManager) Open() error
type WebSummaryPlugin ¶
type WebSummaryPlugin struct {
// contains filtered or unexported fields
}
func (*WebSummaryPlugin) Close ¶
func (*WebSummaryPlugin) Close() error
func (*WebSummaryPlugin) Open ¶
func (plugin *WebSummaryPlugin) Open() error
Click to show internal directories.
Click to hide internal directories.