vars

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT, MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JdocsPath         string = "./jdocs/jdocs.json"
	JdocsDir          string = "./jdocs"
	CustomIntentsPath string = "./customIntents.json"
	BotConfigsPath    string = "./botConfig.json"
	BotInfoPath       string = "./jdocs/botSdkInfo.json"
	BotInfoName       string = "botSdkInfo.json"
	PodName           string = "wire-pod"
	VoskModelPath     string = "../vosk/models/"
	WhisperModelPath  string = "../whisper.cpp/models/"
	SessionCertPath   string = "./session-certs/"
)
View Source
var (
	OutboundIPTester = "8.8.8.8:80"
	CertPath         = "../certs/cert.crt"
	KeyPath          = "../certs/cert.key"
	ServerConfigPath = "../certs/server_config.json"
	Certs            = "../certs"
)
View Source
var APIConfig apiConfig
View Source
var ApiConfigPath = "./apiConfig.json"
View Source
var BotJdocs []botjdoc
View Source
var ChipperCert []byte
View Source
var ChipperKey []byte
View Source
var ChipperKeysLoaded bool
View Source
var CustomIntentsExist bool = false
View Source
var DownloadedVoskModels []string
View Source
var IntentsList = []string{}
View Source
var MatchListList [][]string
View Source
var Packaged bool

if compiled into an installation package. wire-pod will use os.UserConfigDir()

View Source
var SDKIniPath string

/home/name/.anki_vector/

View Source
var SttInitFunc func() error

here to prevent import cycle (localization restructure)

View Source
var VarsInited bool
View Source
var VoskGrammerEnable bool = false
View Source
var WebPort string = "8080"

Functions

func AddJdoc

func AddJdoc(thing string, name string, jdoc AJdoc) uint64

func CreateConfigFromEnv

func CreateConfigFromEnv()

func DeleteData

func DeleteData(thing string)

removes a bot from jdocs file

func GetDownloadedVoskModels

func GetDownloadedVoskModels()

func Init

func Init()

func LoadCustomIntents

func LoadCustomIntents()

func LoadIntents

func LoadIntents() ([][]string, []string, error)

func ReadConfig

func ReadConfig()

func WriteConfigToDisk

func WriteConfigToDisk()

func WriteJdocs

func WriteJdocs()

func WriteSTT

func WriteSTT()

func WriteServer

func WriteServer()

Types

type AJdoc

type AJdoc struct {
	DocVersion     uint64 `protobuf:"varint,1,opt,name=doc_version,json=docVersion,proto3" json:"doc_version,omitempty"`            // first version = 1; 0 => invalid or doesn't exist
	FmtVersion     uint64 `protobuf:"varint,2,opt,name=fmt_version,json=fmtVersion,proto3" json:"fmt_version,omitempty"`            // first version = 1; 0 => invalid
	ClientMetadata string `protobuf:"bytes,3,opt,name=client_metadata,json=clientMetadata,proto3" json:"client_metadata,omitempty"` // arbitrary client-defined string, eg a data fingerprint (typ "", 32 chars max)
	JsonDoc        string `protobuf:"bytes,4,opt,name=json_doc,json=jsonDoc,proto3" json:"json_doc,omitempty"`
}

func GetJdoc

func GetJdoc(thing, jdocname string) (AJdoc, bool)

type IntentsStruct

type IntentsStruct []struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Utterances  []string `json:"utterances"`
	Intent      string   `json:"intent"`
	Params      struct {
		ParamName  string `json:"paramname"`
		ParamValue string `json:"paramvalue"`
	} `json:"params"`
	Exec           string   `json:"exec"`
	ExecArgs       []string `json:"execargs"`
	IsSystemIntent bool     `json:"issystem"`
}
var CustomIntents IntentsStruct

type JsonIntent

type JsonIntent struct {
	Name       string   `json:"name"`
	Keyphrases []string `json:"keyphrases"`
}

type RobotInfoStore

type RobotInfoStore struct {
	GlobalGUID string `json:"global_guid"`
	Robots     []struct {
		Esn       string `json:"esn"`
		IPAddress string `json:"ip_address"`
		// 192.168.1.150:443
		GUID      string `json:"guid"`
		Activated bool   `json:"activated"`
	} `json:"robots"`
}
var BotInfo RobotInfoStore

Jump to

Keyboard shortcuts

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