Commit graph

80 commits

Author SHA1 Message Date
ee5184fefb Remove sqlite support and switch auth to POST 2025-10-16 16:49:23 -03:00
09a9c8f3cd Enhance bot memory and Redis guards
- Derive bot_id from BOT_GUID env var
- Guard concurrent runs with Redis
- Read CACHE_URL for Redis connection
- Extend bot memory keyword to accept comma as separator
- Increase LLM timeouts to 180s (local and legacy)
- Update templates to use bot memory (GET_BOT_MEMORY/SET_BOT_MEMORY)
- Fix start script path to announcements.gbai
2025-10-16 14:22:28 -03:00
acd664245b Migrate automations to param and sqlite
- Rename script_name to param in automation flow and DB schema
- Add BotMemory model and bot_memories table
- Remove script_name field from automation
- Enable sqlite support via rusqlite and related crates (optional)
- Update prompts and queries to use param instead of script_name
- Remove deprecated annoucements GBai templates and align add-req.sh
- Refactor main to initialize automation service and simplify startup
2025-10-16 11:43:02 -03:00
7a583b1a64 Refactor TALK keyword to use try_send
Remove unnecessary async spawn in TALK handling and use `try_send` on
the WebSocket channel. Acquire `response_channels` with `try_lock` and
spawn an async task only when falling back to the web adapter. Clean up
debug logs and add missing `env` import. Also delete an extra blank line
in the announcement start script.
2025-10-15 22:39:04 -03:00
4ead626a90 Refactor LLM parsing and overhaul connection UI
- Strip content up to the “final<|message|>” token in OpenAI responses.
- Replace the text‑based connection‑status indicator with a small
  flashing circle.
- Simplify updateConnectionStatus to take only the status argument.
- Remove special handling of the initial assistant message and
  streamline empty‑state removal.
- Clean up stray blank lines in the announcement template.
2025-10-15 22:24:04 -03:00
d584f8dfc3 Refactor async GET and LLM, add connection UI
- Execute GET requests in a dedicated thread with its own Tokio runtime,
  add timeout handling and clearer error messages.
- Tighten `is_safe_path` checks and simplify HTTP/S3 logic.
- Change `llm_keyword` to accept `Arc<AppState>`, add prompt builder,
  run LLM generation in an isolated thread with timeout.
- Update keyword registration call in `basic/mod.rs`.
- Convert template script to use `let` declarations and return a
  boolean.
- Introduce connection‑status indicator in the web UI with styles,
  automatic reconnection attempts, and proper WS/WSS handling for voice.
2025-10-15 21:18:01 -03:00
872ff5913f Refactor GET keyword with blocking execution
- Replace async task spawning with `block_in_place` to simplify GET
  handling
- Add detailed safety checks for file paths and organization prefixes
- Introduce timeout and keep‑alive settings for HTTP client
- Improve S3 bucket access with existence check, timeouts, and richer
  logging
- Switch tracing logs to debug and add warning logs where appropriate
- Update announcement template to retrieve a PDF, generate a resume via
  LLM, and set context for subsequent queries.
2025-10-15 13:13:27 -03:00
bb9c733fd5 - GET ketyowrd for buckets. 2025-10-15 12:45:15 -03:00
0774251449 - Fix on the web presentation. 2025-10-15 10:37:04 -03:00
e77362e09a Refactor LLM flow, add prompts, fix UI streaming
- Extract LLM generation into `execute_llm_generation` and simplify
  keyword handling.
- Prepend system prompt and session context to LLM prompts in
  `BotOrchestrator`.
- Parse incoming WebSocket messages as JSON and use the `content` field.
- Add async `get_session_context` and stop injecting Redis context into
  conversation history.
- Change default LLM URL to `http://48.217.66.81:8080` throughout the
  project.
- Use the existing DB pool instead of creating a separate custom
  connection.
- Update `start.bas` to call LLM and set a new context string.
- Refactor web client message handling: separate event processing,
  improve streaming logic, reset streaming state on thinking end, and
  remove unused test functions.
2025-10-15 01:14:37 -03:00
60ee933769 Add async Redis context storage and session fetch
- Use `tokio::spawn` to run Redis SET for `SET_CONTEXT` in a background
  task with detailed tracing.
- Move context retrieval from `BotOrchestrator` to `SessionManager`,
  inserting it as a system message in conversation history.
- Remove redundant Redis fetch logic from `BotOrchestrator`.
- Update `DEV.md` to install `valkey-cli`, reorder cargo tools, and
  adjust apt commands.
- Add a `SET_CONTEXT "azul bolinha"` example to the announcements
  template.
2025-10-15 00:01:48 -03:00
b8ab16b839 - Database schema added. 2025-10-14 16:34:34 -03:00
96a02ee06e Refactor session handling and auth flow 2025-10-14 14:51:49 -03:00
3375bb667a Add botserver prompt, auth template, and CSS 2025-10-14 13:51:54 -03:00
16516b23bb Refactor server code and add auth API fixes 2025-10-14 13:51:27 -03:00
3d0e8df36e - New features for start.bas 2025-10-13 17:43:03 -03:00
a1dd7b5826 - Remove all compilation errors. 2025-10-11 12:29:03 -03:00
c88a240903 Migration to Rust removal of Azure. 2025-10-06 10:29:14 -03:00
1b61951def - LocalLLM Embedded. 2025-09-10 11:11:32 -03:00
28c3c3b57b Update templates/edu.gbai/edu.gbdialog/enrollment.bas 2025-08-10 20:59:06 +00:00
d61fb27648 fix: update Puppeteer launch options to use environment variables for headless mode and enhance enrollment confirmation messages 2025-06-27 12:46:15 -03:00
7c998d77f8 fix(KBService): standardize formatting and improve code readability 2025-05-22 20:32:30 -03:00
105aa5ab8f feat(KeywordsExpressions): add support for posting to Instagram with parameters
refactor(GBAdminService): improve folder name extraction logic
refactor(ImageProcessingServices): clean up whitespace and enhance image generation options
refactor(SystemKeywords): simplify rewrite prompt and logging
fix(ChatServices): correct spacing in model invocation
delete(marketing.gbai): remove outdated marketing poster template
add(marketing.gbai): create new marketing poster template with Instagram posting functionality
2025-05-09 21:19:14 -03:00
591e243892 chore: remove unused image assets and update API URL in configuration 2025-04-25 01:46:35 -03:00
c872766664 fix(GBMinService): comment out file writing to prevent overwriting bot manifest 2025-04-17 16:21:02 -03:00
2a4710b902 fix: update URLs and email addresses to reflect new domain 2025-04-15 12:49:05 -03:00
766f829704 fix(llm.gblib): Vector store fixed in /publish. 2024-11-08 11:49:12 -03:00
b287e88779 new(llm.gblib): Added Claude. 2024-11-08 06:49:30 -03:00
5dce8c9423 fix(all): LLM templates on production. 2024-10-30 15:35:11 -03:00
5acbc7a5b9 new(core.gbapp): Timestamp fields are now default. 2024-10-15 15:05:43 -03:00
d9a88bdb0c new(basic.gblib): SEND FILE pdf as temporary images ViewOnce. 2024-10-12 16:28:33 -03:00
d161a23005 new(basic.gblib): HEAR AS QRCODE. 2024-10-02 10:12:03 -03:00
19e923d994 fix(all): Templates OK. 2024-09-29 20:23:13 -03:00
55b0c1e7bb fix(core.gbapp): Themes missing in PROD. 2024-09-26 12:36:08 -03:00
35b90dc269 fix(all): Templates OK. 2024-09-25 17:30:32 -03:00
5f01d95b75 Merge branch 'main' of https://github.com/GeneralBots/BotServer 2024-09-25 17:01:56 -03:00
110c191ede fix(all): LLM tools OK. 2024-09-25 16:54:52 -03:00
417c89b515 Update README.md 2024-09-24 21:09:11 -03:00
28b7831f96 Update README.md 2024-09-24 21:01:49 -03:00
bf93c9ec15 new(all): Node.js v22 and ts-node. 2024-09-24 20:32:38 -03:00
08d81c18d3 new(all): Node.js v22 and ts-node. 2024-09-24 17:03:37 -03:00
Rodrigo Rodriguez
2ebaa1151c fix (templates): ai-search OK. Fix themes. 2024-09-19 17:46:43 -03:00
Rodrigo Rodriguez
64ee0b7ee7 fix (templates): ai-search OK. Image by AI. 2024-09-19 09:17:30 -03:00
Rodrigo Rodriguez
b22a3dc87b fix (templates): ai-search OK. 2024-09-18 18:43:19 -03:00
Rodrigo Rodriguez
d7b80f596f fix (templates): ai-search OK. 2024-09-18 14:46:39 -03:00
Rodrigo Rodriguez
130ecd81fd fix (templates): ai-search OK. 2024-09-18 13:45:33 -03:00
Rodrigo Rodriguez
76bf359831 fix (templates): ai-search OK. 2024-09-18 13:21:21 -03:00
Rodrigo Rodriguez
a8278458fd fix (templates): llm-server OK. 2024-09-15 18:30:08 -03:00
Rodrigo Rodriguez
50b2a47379 fix (templates): llm-server almost OK. 2024-09-15 16:30:03 -03:00
Rodrigo Rodriguez
dc6b3f7ce4 fix (templates): llm-server almost OK. 2024-09-15 14:41:56 -03:00