Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAllBotConfig() (botType string, checkRes map[string]bool)
- func CheckBotConfig(botType string) (actualotType string, err error)
- func CheckGeminiConfig() error
- func CheckGptConfig() error
- func GetBotType() string
- func GetBotWelcomeReply(botType string) string
- func GetGeminiKey() string
- func GetGeminiWelcomeReply() (r string)
- func GetGptToken() string
- func GetGptWelcomeReply() (r string)
- func GetMaxTokens() int
- func GetQwenApiKey() string
- func GetQwenHostUrl() string
- func GetQwenModelVersion() string
- func GetQwenWelcomeReply() (r string)
- func GetSparApiKey() string
- func GetSparkAppId() string
- func GetSparkAppSecret() string
- func GetSparkHostUrl() string
- func GetSparkWelcomeReply() (r string)
- func GetUserBotType(userId string) (bot string)
- func GetWxAppId() string
- func GetWxAppSecret() string
- func GetWxEventKeyChatGpt() string
- func GetWxEventKeyChatQwen() string
- func GetWxEventKeyChatSpark() string
- func GetWxHelpReply() string
- func GetWxSubscribeReply() string
- func GetWxToken() string
- func IsSupportPrompt(botType string) bool
- type QwenConfig
- type SparkConfig
Constants ¶
View Source
const ( GPT = "gpt" ECHO = "echo" Bot_Type_Key = "botType" Bot_Type_Echo = "echo" Bot_Type_Gpt = "gpt" Bot_Type_Spark = "spark" Bot_Type_Qwen = "qwen" Bot_Type_Gemini = "gemini" )
View Source
const ( Gemini_Welcome_Reply_Key = "geminiWelcomeReply" Gemini_Key = "geminiKey" )
View Source
const ( Gpt_Welcome_Reply_Key = "gptWelcomeReply" Gpt_Token = "GPT_TOKEN" )
View Source
const ( Qwen_Host_Url_Key = "qwenUrl" Qwen_ApiKey_Key = "qwenApiKey" Qwen_Model_Version_Key = "qwenModelVersion" Qwen_Welcome_Reply_Key = "qwenWelcomeReply" )
View Source
const ( Spark_Host_Url_Key = "sparkUrl" Spark_App_Id_Key = "sparkAppId" Spark_App_Secret_Key = "sparkAppSecret" Spark_ApiKey_Key = "sparkApiKey" Spark_Welcome_Reply_Key = "sparkWelcomeReply" )
View Source
const ( Wx_Token_key = "WX_TOKEN" Wx_App_Id_key = "WX_APP_ID" Wx_App_Secret_key = "WX_APP_SECRET" Wx_Subscribe_Reply_key = "WX_SUBSCRIBE_REPLY" Wx_Help_Reply_key = "WX_HELP_REPLY" Wx_Event_Key_Chat_Gpt_key = "AI_CHAT_GPT" Wx_Event_Key_Chat_Spark_key = "AI_CHAT_SPARK" Wx_Event_Key_Chat_Qwen_key = "AI_CHAT_QWEN" Wx_Command_Help = "/help" Wx_Command_Gpt = "/gpt" Wx_Command_Spark = "/spark" Wx_Command_Qwen = "/qwen" Wx_Command_Gemini = "/gemini" Wx_Command_Prompt = "/prompt" Wx_Command_RmPrompt = "/cpt" Wx_Command_GetPrompt = "/getpt" Wx_Command_SetModel = "/setmodel" Wx_Command_GetModel = "/getmodel" Wx_Command_Clear = "/clear" Wx_Todo_Add = "/ta" Wx_Todo_Del = "/td" Wx_Todo_List = "/tl" Wx_Coin = "/cb" )
Variables ¶
View Source
var ( Cache sync.Map Support_Bots = []string{Bot_Type_Gpt, Bot_Type_Spark, Bot_Type_Qwen, Bot_Type_Gemini} )
View Source
var (
Wx_Commands = []string{Wx_Command_Help, Wx_Command_Gpt, Wx_Command_Spark, Wx_Command_Qwen, Wx_Command_Gemini}
)
Functions ¶
func CheckAllBotConfig ¶
func CheckBotConfig ¶
func CheckGeminiConfig ¶
func CheckGeminiConfig() error
func CheckGptConfig ¶
func CheckGptConfig() error
func GetBotType ¶
func GetBotType() string
func GetBotWelcomeReply ¶
func GetGeminiKey ¶
func GetGeminiKey() string
func GetGeminiWelcomeReply ¶
func GetGeminiWelcomeReply() (r string)
func GetGptToken ¶
func GetGptToken() string
func GetGptWelcomeReply ¶
func GetGptWelcomeReply() (r string)
func GetMaxTokens ¶
func GetMaxTokens() int
func GetQwenApiKey ¶
func GetQwenApiKey() string
func GetQwenHostUrl ¶
func GetQwenHostUrl() string
func GetQwenModelVersion ¶
func GetQwenModelVersion() string
func GetQwenWelcomeReply ¶
func GetQwenWelcomeReply() (r string)
func GetSparApiKey ¶
func GetSparApiKey() string
func GetSparkAppId ¶
func GetSparkAppId() string
func GetSparkAppSecret ¶
func GetSparkAppSecret() string
func GetSparkHostUrl ¶
func GetSparkHostUrl() string
func GetSparkWelcomeReply ¶
func GetSparkWelcomeReply() (r string)
func GetUserBotType ¶
func GetWxAppId ¶
func GetWxAppId() string
func GetWxAppSecret ¶
func GetWxAppSecret() string
func GetWxEventKeyChatGpt ¶
func GetWxEventKeyChatGpt() string
func GetWxEventKeyChatQwen ¶
func GetWxEventKeyChatQwen() string
func GetWxEventKeyChatSpark ¶
func GetWxEventKeyChatSpark() string
func GetWxHelpReply ¶
func GetWxHelpReply() string
func GetWxSubscribeReply ¶
func GetWxSubscribeReply() string
func GetWxToken ¶
func GetWxToken() string
func IsSupportPrompt ¶
Types ¶
type QwenConfig ¶
func GetQwenConfig ¶
func GetQwenConfig() (cfg *QwenConfig, err error)
type SparkConfig ¶
type SparkConfig struct { HostUrl string AppId string ApiSecret string ApiKey string SparkDomainVersion string }
func GetSparkConfig ¶
func GetSparkConfig() (cfg *SparkConfig, err error)
Click to show internal directories.
Click to hide internal directories.