Commit graph

89 commits

Author SHA1 Message Date
78d154cc7f feat(bootstrap): add env check and improve config update logic
Introduce environment existence check to prevent redundant bootstrap runs and ensure smoother startup. Refactor `update_bot_config` to use globally unique config keys and atomic updates for better data consistency.
2025-10-28 21:06:31 -03:00
44c745ef57 feat(config): refresh environment before establishing DB connection
Reload configuration from environment to ensure latest DATABASE_URL and credentials are used before creating the database connection. This prevents stale config values when environment variables change.
2025-10-28 20:48:28 -03:00
f29a3c1259 - Migration to Apache OpenDAL. 2025-10-28 14:00:52 -03:00
6ad29634ea - Termination procedure optional. 2025-10-26 17:13:58 -03:00
a8982e5914 Add AWS SDK integration and update bot configuration management
- Introduced AWS SDK dependencies for S3 and CSV handling.
- Implemented logic to check and update the default bot configuration in S3 after component installation.
- Added a new configuration CSV template for bot settings.
- Refactored package manager to register cache component with updated download URL and binary name.
- Updated README and Cargo files to reflect new dependencies and configuration options.
2025-10-26 14:15:43 -03:00
dfe7e4e4b6 Add About and Login pages with responsive design and user authentication
- Created a new About page (index.html) detailing the BotServer platform, its features, and technology stack.
- Developed a Login page (login.html) with sign-in and sign-up functionality, including form validation and user feedback messages.
- Removed the empty style.css file as it is no longer needed.
2025-10-26 00:02:19 -03:00
a0c367d79b Revert "Implement token-based context usage in chat UI"
This reverts commit 82aa3e8d36.
2025-10-24 11:17:22 -03:00
82aa3e8d36 Implement token-based context usage in chat UI
- Replace simple message count with token-based calculation
- Add token estimation function (4 chars ≈ 1 token)
- Set MAX_TOKENS to 5000 and MIN_DISPLAY_PERCENTAGE to 20
- Update context usage display to show token count percentage
- Track tokens for both user and assistant messages
- Handle server-provided context usage as ratio of MAX_TOKENS
2025-10-23 16:33:23 -03:00
c242aa010b Enable template bot creation and fix bot schema 2025-10-21 22:43:28 -03:00
9c36aa10fa - More automation from start to web, user sessions. 2025-10-20 23:32:49 -03:00
248ad08efc Add new KB and session association tables 2025-10-20 19:49:54 -03:00
de5b651b89 Refactor config loading and DB URL parsing 2025-10-20 16:52:08 -03:00
f8d4e8925f Add indicatif for progress bars and enhance bootstrap
----------------------------------------------------------------
2025-10-19 19:28:08 -03:00
fa0fa390bd Add await to bootstrap start_all call
Fixes the asynchronous bootstrap process by properly awaiting the
start_all method, ensuring all services are started before proceeding.
2025-10-19 15:42:13 -03:00
6f30517526 - Tables is installing. 2025-10-19 14:02:47 -03:00
aa69c63cee Refactor bootstrap and package manager, add ureq
- Split package manager into separate modules
- Expose only the installer API
- Simplify BootstrapManager to install components and load config
- Pin ureq to 3.1.2 and add ureq‑proto crate
- Clean up configuration code and remove legacy comments
- Update helper scripts and server start command formatting
2025-10-19 11:08:23 -03:00
88a52f172e - New bootstrap engine. 2025-10-18 19:08:00 -03:00
a77e0d6aa5 - Added logic to Knowledge management. 2025-10-18 18:19:08 -03:00
be1e2575f9 - Refactor in bot package. 2025-10-18 12:01:39 -03:00
79ac6df738 - Added component management. 2025-10-18 09:26:48 -03:00
e5a9752caa 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
4acb9bb8f5 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
f401c170d4 - GET ketyowrd for buckets. 2025-10-15 12:45:15 -03:00
f626793d77 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
8f96cd1015 Refactor server code and add auth API fixes 2025-10-14 13:51:27 -03:00
3aeb3ebc70 - New features for start.bas 2025-10-13 17:43:03 -03:00
712266a9f8 - Mew LLM provider. 2025-10-12 20:54:42 -03:00
e00eb40d43 Refactor to Arc<AppState> for shared state
- Migrate core services to store Arc<AppState> and use locks
- Centralize state in AppState with Arc-wrapped managers
- Update handlers to pass Arc<AppState> via web::Data
- Add Default for AppState and initialize components in main
- Update debug.json program path from gbserver to botserver
2025-10-12 20:12:49 -03:00
e14908fc0b Migrate to web/index.html and OpenAI client
- Load index.html from web/index.html instead of templates/static
- Initialize OpenAIClient with an empty key and local endpoint
- Remove the old static/index.html file
2025-10-12 17:41:41 -03:00
4c3bf0f029 - 0 errors. 2025-10-11 20:41:52 -03:00
147d12b7c0 - main.rs is compiling again. 2025-10-11 20:02:14 -03:00
283774aa0f - Remove all compilation errors. 2025-10-11 12:29:03 -03:00
4251757391 - Remove of all warnings. 2025-10-07 10:53:09 -03:00
a8c2a5ba25 Add organizations table and build fix script
Create organizations table with UUID primary key, unique slug,
timestamps, and indexes on slug and created_at. Add
scripts/dev/build_fix.sh to consolidate prompts and source files for LLM
context. Allow dead_code in main.rs and rename unused org_id parameter
to _org_id.
2025-10-07 09:08:53 -03:00
8a9cd104d6 - Warning removal and restore of old code. 2025-10-07 07:16:03 -03:00
84f28bc956 - New rust version is now compiling. 2025-10-06 20:49:38 -03:00
c0c470e9aa - Fixing compilation errors. 2025-10-06 20:06:43 -03:00
66e2ed2ad1 - Just more errors to fix. 2025-10-06 19:12:13 -03:00
9749893dd0 Migration to Rust and free from Azure. 2025-10-06 10:30:17 -03:00