Documentation ¶
Index ¶
Constants ¶
View Source
const LatestAskApi = "" /* 127-byte string literal not displayed */
View Source
const MicoApi = "micoapi"
View Source
const TTSIndex = 0
View Source
const WakeupIndex = 1
View Source
const WakeupKeyword = "小爱同学"
Variables ¶
View Source
var ChangePromptKeyWord = []string{"更改提示词"}
View Source
var DefaultCommand = [2]string{"5-1", "5-5"}
View Source
var EdgeTtsDict = map[string]string{
"用英语": "en-US-AriaNeural",
"用日语": "ja-JP-NanamiNeural",
"用法语": "fr-BE-CharlineNeural",
"用韩语": "ko-KR-SunHiNeural",
"用德语": "de-AT-JonasNeural",
}
View Source
var HardwareCommandDict = map[string][2]string{
"LX06": {"5-1", "5-5"},
"L05B": {"5-3", "5-4"},
"S12A": {"5-1", "5-5"},
"LX01": {"5-1", "5-5"},
"L06A": {"5-1", "5-5"},
"LX04": {"5-1", "5-4"},
"L05C": {"5-3", "5-4"},
"L17A": {"7-3", "7-4"},
"X08E": {"7-3", "7-4"},
"LX05A": {"5-1", "5-5"},
"LX5A": {"5-1", "5-5"},
"L07A": {"5-1", "5-5"},
"L15A": {"7-3", "7-4"},
"X6A": {"7-3", "7-4"},
}
View Source
var JarvisKeyWords = []string{"帮我", "请回答"}
View Source
var Prompt = "以下请用100字以内回答,请只回答文字不要带链接"
Functions ¶
Types ¶
type Config ¶
type Config struct { Hardware string `json:"hardware" toml:"hardware"` Account string `json:"account" toml:"account"` Password string `json:"password" toml:"password"` OpenAIKey string `json:"openai_key" toml:"openai_key"` OpenAIBackend string `json:"openai_backend" toml:"openai_backend"` Proxy string `json:"proxy,omitempty" toml:"proxy,omitempty"` MiDID string `json:"mi_did" toml:"mi_did"` Keywords []string `json:"keyword" toml:"keyword"` ChangePromptKeywords []string `json:"change_prompt_keyword" toml:"change_prompt_keyword"` Prompt string `json:"prompt" toml:"prompt"` MuteXiaoAI bool `json:"mute_xiaoai" toml:"mute_xiaoai"` Bot string `json:"bot" toml:"bot"` APIBase string `json:"api_base,omitempty" toml:"api_base,omitempty"` UseCommand bool `json:"use_command" toml:"use_command"` Verbose bool `json:"verbose" toml:"verbose"` StartConversation string `json:"start_conversation" toml:"start_conversation"` EndConversation string `json:"end_conversation" toml:"end_conversation"` Stream bool `json:"stream" toml:"stream"` EnableEdgeTTS bool `json:"enable_edge_tts" toml:"enable_edge_tts"` EdgeTTSVoice string `json:"edge_tts_voice" toml:"edge_tts_voice"` GPTOptions map[string]interface{} `json:"gpt_options" toml:"gpt_options"` //BingCookiePath string `json:"bing_cookie_path" toml:"bing_cookie_path"` //BingCookies map[string]interface{} `json:"bing_cookies,omitempty" toml:"bing_cookies,omitempty"` TokenPath string `json:"token_path" toml:"token_path"` }
func NewConfigFromFile ¶
func NewConfigFromOptions ¶
func (*Config) ReadFromFile ¶
type MiBot ¶
type Record ¶
type Record struct { BitSet []int `json:"bitSet"` Answers []struct { BitSet []int `json:"bitSet"` Type string `json:"type"` Tts struct { BitSet []int `json:"bitSet"` Text string `json:"text"` } `json:"tts"` } `json:"answers"` Time int64 `json:"time"` Query string `json:"query"` RequestID string `json:"requestId"` }
type StatusInfo ¶
Click to show internal directories.
Click to hide internal directories.