summaryrefslogtreecommitdiff
path: root/Omni
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-16 08:20:54 -0500
committerBen Sima <ben@bensima.com>2025-12-16 08:20:54 -0500
commit122d73ac9d2472f91ed00965d03d1e761da72699 (patch)
treef84e21139113cf7d8e4ff2d3f7bf4c81d11e6fd2 /Omni
parenta7dcb30c7a465d9fce72b7fc3e605470b2b59814 (diff)
refactor: Rename Bot to Ava, remove cost guardrail
- Rename Omni/Bot.hs to Omni/Ava.hs - Delete Omni/Bot.scm (unused Guile version) - Remove cost limit (was 10 cents, now 0) - Increase max iterations from 10 to 50
Diffstat (limited to 'Omni')
-rw-r--r--Omni/Agent/Telegram.hs4
-rwxr-xr-xOmni/Ava.hs (renamed from Omni/Bot.hs)22
-rwxr-xr-xOmni/Bot.scm61
3 files changed, 13 insertions, 74 deletions
diff --git a/Omni/Agent/Telegram.hs b/Omni/Agent/Telegram.hs
index 07c8e4b..a24c3b9 100644
--- a/Omni/Agent/Telegram.hs
+++ b/Omni/Agent/Telegram.hs
@@ -1012,10 +1012,10 @@ processEngagedMessage tgConfig provider engineCfg msg uid userName chatId userMe
Engine.defaultAgentConfig
{ Engine.agentSystemPrompt = systemPrompt,
Engine.agentTools = tools,
- Engine.agentMaxIterations = 10,
+ Engine.agentMaxIterations = 50,
Engine.agentGuardrails =
Engine.defaultGuardrails
- { Engine.guardrailMaxCostCents = 10.0,
+ { Engine.guardrailMaxCostCents = 1000.0,
Engine.guardrailMaxDuplicateToolCalls = 10
}
}
diff --git a/Omni/Bot.hs b/Omni/Ava.hs
index 77a0408..2dfecb1 100755
--- a/Omni/Bot.hs
+++ b/Omni/Ava.hs
@@ -3,18 +3,18 @@
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE NoImplicitPrelude #-}
--- | Omni Bot - Family assistant via Telegram.
+-- | Ava - AI assistant via Telegram.
--
-- Usage:
--- bot # Uses TELEGRAM_BOT_TOKEN env var
--- bot --token=XXX # Explicit token
--- bot --model=MODEL # Override LLM model
+-- ava # Uses TELEGRAM_BOT_TOKEN env var
+-- ava --token=XXX # Explicit token
+-- ava --model=MODEL # Override LLM model
--
--- : out bot
+-- : out ava
-- : dep aeson
-- : dep http-conduit
-- : dep stm
-module Omni.Bot where
+module Omni.Ava where
import Alpha
import qualified Data.Text as Text
@@ -38,12 +38,12 @@ plan =
help :: Cli.Docopt
help =
[Cli.docopt|
-bot - Omni family assistant via Telegram
+ava - AI assistant via Telegram
Usage:
- bot [--token=TOKEN] [--model=MODEL]
- bot test
- bot (-h | --help)
+ ava [--token=TOKEN] [--model=MODEL]
+ ava test
+ ava (-h | --help)
Options:
-h --help Show this help
@@ -59,7 +59,7 @@ move args = do
test :: Test.Tree
test =
Test.group
- "Omni.Bot"
+ "Omni.Ava"
[ Test.unit "help is non-empty" <| do
let usage = str (Docopt.usage help) :: String
null usage Test.@=? False
diff --git a/Omni/Bot.scm b/Omni/Bot.scm
deleted file mode 100755
index ff81c53..0000000
--- a/Omni/Bot.scm
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env run.sh
-!#
-;; : out omnibot
-;;
-;; Usage with ii:
-;;
-;; tail -f \#omni/out | guile -L $CODEROOT -s Omni/Bot.scm
-;;
-(define-module (Omni Bot) #:export (main))
-
-(import (ice-9 rdelim))
-(import (ice-9 match))
-(import (ice-9 regex))
-(import (ice-9 receive))
-(import (bs core))
-(import (prefix (bs string) string.))
-
-(define (log msg)
- (display msg (current-error-port)))
-
-(define (is-command? msg)
- (string.prefix? msg "omnibot:"))
-
-(define (parse-line line)
- (if (eof-object? line)
- (exit)
- (let ([matches (regexp-exec
- (make-regexp "<(\\S*)>(.*)" regexp/extended)
- (string-drop line 11))])
- (if matches
- `(user
- ,(match:substring matches 1)
- ,(string.lstrip (match:substring matches 2) #\space))
- `(system ,(string-drop line 11))))))
-
-(define (dispatch user msg)
- (let ([msg (-> msg
- (string-drop (string-length "omnibot:"))
- (string.lstrip #\space))])
- (cond
- ((equal? msg "hi")
- (display (fmt "~a: well, hello!" user)))
-
- (else
- (display (fmt "command not understood: ~a" msg))))))
-
-(define (main args)
- (while #t
- (match (parse-line (read-line))
- [('user user msg)
- (if (is-command? msg)
- (dispatch user msg)
- (begin
- (log (fmt "user: ~a " user))
- (log (fmt "message: ~a" msg))))]
-
- [('system msg)
- (log (fmt "system: ~a" msg))])
-
- (newline)
- (force-output)))