vars

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 15 Imported by: 3

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/"
	SavedChatsPath    string = "./openaiChats.json"
	VersionFile       string = "./version"
)
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 AndroidPath string
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 IsPackagedLinux bool
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 RecurringInfo []RecurringInfoStore
View Source
var RememberedChats []RememberedChat
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 AddToRInfo added in v1.0.1

func AddToRInfo(esn string, id string, ip string)

func CreateConfigFromEnv

func CreateConfigFromEnv()

func DeleteData

func DeleteData(thing string)

removes a bot from jdocs file

func GetDownloadedVoskModels

func GetDownloadedVoskModels()

func GetOutboundIP added in v1.2.7

func GetOutboundIP() net.IP

func GetRobot added in v1.2.5

func GetRobot(esn string) (*vector.Vector, error)

func Init

func Init()

func LoadChats added in v1.1.6

func LoadChats()

func LoadCustomIntents

func LoadCustomIntents()

func LoadIntents

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

func ReadConfig

func ReadConfig()

func ReadSessionCerts added in v1.0.1

func ReadSessionCerts()

func SaveChats added in v1.1.6

func SaveChats()

func WriteConfigToDisk

func WriteConfigToDisk()

func WriteJdocs

func WriteJdocs()

func WriteSTT

func WriteSTT()

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 RecurringInfoStore added in v1.0.1

type RecurringInfoStore struct {
	// Vector-R2D2
	ID string `json:"id"`
	// 00e20145
	ESN string `json:"esn"`
	// 192.168.1.150
	IP string `json:"ip"`
}

type RememberedChat added in v1.1.6

type RememberedChat struct {
	ESN   string                         `json:"esn"`
	Chats []openai.ChatCompletionMessage `json:"chats"`
}

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