aboutsummaryrefslogtreecommitdiffstats
path: root/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'types.go')
-rw-r--r--types.go124
1 files changed, 87 insertions, 37 deletions
diff --git a/types.go b/types.go
index fd37291..9f127ad 100644
--- a/types.go
+++ b/types.go
@@ -102,42 +102,45 @@ type TomlConfig struct {
LuaStates map[string]LuaLstates
LuaCommands map[string]LuaCommand
TriggeredScripts map[string]TriggeredScripts
- Rss map[string]RssFile `toml:"rss"`
- RequestTimeout int `toml:"requestTimeout"`
- MillaReconnectDelay int `toml:"millaReconnectDelay"`
- IrcPort int `toml:"ircPort"`
- KeepAlive int `toml:"keepAlive"`
- MemoryLimit int `toml:"memoryLimit"`
- PingDelay int `toml:"pingDelay"`
- PingTimeout int `toml:"pingTimeout"`
- OllamaMirostat int `json:"ollamaMirostat"`
- OllamaMirostatEta float64 `json:"ollamaMirostatEta"`
- OllamaMirostatTau float64 `json:"ollamaMirostatTau"`
- OllamaNumCtx int `json:"ollamaNumCtx"`
- OllamaRepeatLastN int `json:"ollamaRepeatLastN"`
- OllamaRepeatPenalty float64 `json:"ollamaRepeatPenalty"`
- Temperature float64 `json:"temperature"`
- OllamaSeed int `json:"ollamaSeed"`
- OllamaNumPredict int `json:"ollamaNumPredict"`
- OllamaMinP float64 `json:"ollamaMinP"`
- TopP float32 `toml:"topP"`
- TopK int32 `toml:"topK"`
- IrcBackOffInitialInterval int `toml:"ircBackOffInitialInterval"`
- IrcBackOffRandomizationFactor float64 `toml:"ircbackOffRandomizationFactor"`
- IrcBackOffMultiplier float64 `toml:"ircBackOffMultiplier"`
- IrcBackOffMaxInterval int `toml:"ircBackOffMaxInterval"`
- DbBackOffInitialInterval int `toml:"dbBackOffInitialInterval"`
- DbBackOffRandomizationFactor float64 `toml:"dbBackOffRandomizationFactor"`
- DbBackOffMultiplier float64 `toml:"dbBackOffMultiplier"`
- DbBackOffMaxInterval int `toml:"dbBackOffMaxInterval"`
- EnableSasl bool `toml:"enableSasl"`
- SkipTLSVerify bool `toml:"skipTLSVerify"`
- UseTLS bool `toml:"useTLS"`
- DisableSTSFallback bool `toml:"disableSTSFallback"`
- AllowFlood bool `toml:"allowFlood"`
- Debug bool `toml:"debug"`
- Out bool `toml:"out"`
- AdminOnly bool `toml:"adminOnly"`
+ Rss map[string]RssFile `toml:"rss"`
+ UserAgentActions map[string]UserAgentRequest `toml:"userAgentActions"`
+ Aliases map[string]Alias `toml:"aliases"`
+ RequestTimeout int `toml:"requestTimeout"`
+ MillaReconnectDelay int `toml:"millaReconnectDelay"`
+ IrcPort int `toml:"ircPort"`
+ KeepAlive int `toml:"keepAlive"`
+ MemoryLimit int `toml:"memoryLimit"`
+ PingDelay int `toml:"pingDelay"`
+ PingTimeout int `toml:"pingTimeout"`
+ OllamaMirostat int `toml:"ollamaMirostat"`
+ OllamaMirostatEta float64 `toml:"ollamaMirostatEta"`
+ OllamaMirostatTau float64 `toml:"ollamaMirostatTau"`
+ OllamaNumCtx int `toml:"ollamaNumCtx"`
+ OllamaRepeatLastN int `toml:"ollamaRepeatLastN"`
+ OllamaRepeatPenalty float64 `toml:"ollamaRepeatPenalty"`
+ Temperature float64 `toml:"temperature"`
+ OllamaSeed int `toml:"ollamaSeed"`
+ OllamaNumPredict int `toml:"ollamaNumPredict"`
+ OllamaMinP float64 `toml:"ollamaMinP"`
+ OllamaThink string `toml:"ollamaThink"`
+ TopP float32 `toml:"topP"`
+ TopK int32 `toml:"topK"`
+ IrcBackOffInitialInterval int `toml:"ircBackOffInitialInterval"`
+ IrcBackOffRandomizationFactor float64 `toml:"ircbackOffRandomizationFactor"`
+ IrcBackOffMultiplier float64 `toml:"ircBackOffMultiplier"`
+ IrcBackOffMaxInterval int `toml:"ircBackOffMaxInterval"`
+ DbBackOffInitialInterval int `toml:"dbBackOffInitialInterval"`
+ DbBackOffRandomizationFactor float64 `toml:"dbBackOffRandomizationFactor"`
+ DbBackOffMultiplier float64 `toml:"dbBackOffMultiplier"`
+ DbBackOffMaxInterval int `toml:"dbBackOffMaxInterval"`
+ EnableSasl bool `toml:"enableSasl"`
+ SkipTLSVerify bool `toml:"skipTLSVerify"`
+ UseTLS bool `toml:"useTLS"`
+ DisableSTSFallback bool `toml:"disableSTSFallback"`
+ AllowFlood bool `toml:"allowFlood"`
+ Debug bool `toml:"debug"`
+ Out bool `toml:"out"`
+ AdminOnly bool `toml:"adminOnly"`
pool *pgxpool.Pool
Admins []string `toml:"admins"`
IrcChannels [][]string `toml:"ircChannels"`
@@ -205,7 +208,8 @@ func (config *TomlConfig) deleteTriggeredScript(name string) {
}
type AppConfig struct {
- Ircd map[string]TomlConfig `toml:"ircd"`
+ Ircd map[string]TomlConfig `toml:"ircd"`
+ Ghost map[string]GhostNetwork `toml:"ghost"`
}
type OllamaRequestOptions struct {
@@ -235,6 +239,7 @@ type OllamaChatMessagesResponse struct {
type OllamaChatRequest struct {
Model string `json:"model"`
Stream bool `json:"stream"`
+ Think string `json:"think"`
KeepAlive time.Duration `json:"keep_alive"`
Options OllamaRequestOptions `json:"options"`
System string `json:"system"`
@@ -311,3 +316,48 @@ type ProxyRoundTripper struct {
ProxyURL string
}
+
+type UserAgentRequest struct {
+ Agent_Name string `json:"agent_name" toml:"agent_name"`
+ Instructions string `json:"instructions" toml:"instructions"`
+ Query string `json:"query" toml:"query"`
+}
+
+type UserAgentResponse struct {
+ Agent_Name string `json:"agent_name"`
+ Response string `json:"response"`
+}
+
+type Alias struct {
+ Alias string `toml:"alias"`
+}
+
+type GhostRuleSet struct {
+ Types []string `toml:"types"`
+ OllamaEndpoint string `toml:"ollamaEndpoint"`
+ Instructions []string `toml:"instructions"`
+ Prompt string `toml:"prompt"`
+ DisableAll bool `toml:"disableAll"`
+ WhiteList []string `toml:"whiteList"`
+ EnableAll bool `toml:"enableAll"`
+ BlackList []string `toml:"blackList"`
+ Incoming bool `toml:"incoming"`
+ Rephrase bool `toml:"rephrase"`
+}
+
+type GhostNetwork struct {
+ ServerCert string `toml:"serverCert"`
+ ServerKey string `toml:"serverKey"`
+ ServerAddress string `toml:"ServerAddress"`
+ ServerName string `toml:"serverName"`
+ UpstreamProxy string `toml:"upstreamProxy"`
+ UseTLS bool `toml:"useTLS"`
+ SkipTLSVerify bool `toml:"skipTLSVerify"`
+ SaslUser string `toml:"saslUser"`
+ SaslPass string `toml:"saslPass"`
+ CertPath string `toml:"certPath"`
+ KeyPath string `toml:"keyPath"`
+ ListenAddress string `toml:"listenAddress"`
+ LogRaw bool `toml:"logRaw"`
+ GhostRuleSets map[string]GhostRuleSet `toml:"ghostRuleSet"`
+}