config

package
v0.0.0-...-e3d9cf3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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

Functions

func CheckAllBotConfig

func CheckAllBotConfig() (botType string, checkRes map[string]bool)

func CheckBotConfig

func CheckBotConfig(botType string) (actualotType string, err error)

func CheckGeminiConfig

func CheckGeminiConfig() error

func CheckGptConfig

func CheckGptConfig() error

func GetBotType

func GetBotType() string

func GetBotWelcomeReply

func GetBotWelcomeReply(botType string) string

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 GetUserBotType(userId string) (bot string)

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

func IsSupportPrompt(botType string) bool

Types

type QwenConfig

type QwenConfig struct {
	HostUrl      string
	ApiKey       string
	ModelVersion string
}

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)

Jump to

Keyboard shortcuts

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