Commit graph

22 commits

Author SHA1 Message Date
LUIS NOVO
ab5560c9a2 refactor: reorganize folder structure for better maintainability
Changes:
- Move migrations/ under open_notebook/database/migrations/
- Extract AI models to open_notebook/ai/ (Model, ModelManager, provision)
- Extract podcasts to open_notebook/podcasts/ (EpisodeProfile, SpeakerProfile, PodcastEpisode)
- Reorganize prompts to mirror graphs structure (chat/, source_chat/)

This improves code organization by:
- Consolidating database concerns (migrations now with database code)
- Separating AI infrastructure from domain entities
- Isolating podcast feature into its own module
- Creating consistent prompt/graph naming conventions

All 52 tests pass.
2026-01-03 14:04:27 -03:00
Justin Florentine
855e730577
fix: preserve AIMessage metadata when cleaning thinking content
Use model_copy() instead of creating new AIMessage to preserve
response_metadata, id, usage_metadata, etc. Also adds test coverage
for malformed thinking tags pattern.

Addresses PR #333 feedback from lfnovo and cubic-dev-ai.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 20:08:12 -05:00
Justin Florentine
869664a10b
fix: strip <think> tags from chat responses
Add thinking content cleaning to notebook and source chat graphs.
Previously, models that output <think>...</think> tags (like DeepSeek)
or malformed variants without opening tags (like Nemotron) would leak
reasoning content into user-visible responses.

Changes:
- chat.py: Clean AI response content before returning messages
- source_chat.py: Same fix for source-specific chat
- text_utils.py: Handle malformed output where opening <think> tag
  is missing but </think> is present

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 16:31:23 -05:00
LUIS NOVO
a51bb9d792 fix: missing parenthesis 2025-10-18 13:22:39 -03:00
LUIS NOVO
8b5daa86bc fix: max tokens max is 8192 now 2025-10-18 13:21:53 -03:00
Luis Novo
b7e656a319
Version 1 (#160)
New front-end
Launch Chat API
Manage Sources
Enable re-embedding of all contents
Sources can be added without a notebook now
Improved settings
Enable model selector on all chats
Background processing for better experience
Dark mode
Improved Notes

Improved Docs: 
- Remove all Streamlit references from documentation
- Update deployment guides with React frontend setup
- Fix Docker environment variables format (SURREAL_URL, SURREAL_PASSWORD)
- Update docker image tag from :latest to :v1-latest
- Change navigation references (Settings → Models to just Models)
- Update development setup to include frontend npm commands
- Add MIGRATION.md guide for users upgrading from Streamlit
- Update quick-start guide with correct environment variables
- Add port 5055 documentation for API access
- Update project structure to reflect frontend/ directory
- Remove outdated source-chat documentation files
2025-10-18 12:46:22 -03:00
Luis Novo
d7b0fff954
Api podcast migration (#93)
Creates the API layer for Open Notebook
Creates a services API gateway for the Streamlit front-end
Migrates the SurrealDB SDK to the official one
Change all database calls to async
New podcast framework supporting multiple speaker configurations
Implement the surreal-commands library for async processing
Improve docker image and docker-compose configurations
2025-07-17 08:36:11 -03:00
LUIS NOVO
2afbd36cb4 refactor: implement ai_prompter library 2025-06-01 08:09:33 -03:00
LUIS NOVO
281abdf01b improve the accuracy of ids in the citations 2024-11-13 11:55:38 -03:00
LUIS NOVO
183149014e change model provisioning parameters 2024-11-08 16:08:54 -03:00
LUIS NOVO
b4ba3ef4c8 change model provisioning strategy 2024-11-04 09:49:11 -03:00
LUIS NOVO
d9c0c93deb improved typing 2024-11-01 22:50:27 -03:00
LUIS NOVO
7dc37a3ac7 model fixes 2024-11-01 22:43:33 -03:00
LUIS NOVO
15048b0839 simplify model provisioning 2024-11-01 21:32:40 -03:00
LUIS NOVO
3b262a63f4 better model mgmt 2024-11-01 21:11:23 -03:00
LUIS NOVO
feabfaed01 remove defaultmodel from config file 2024-11-01 19:56:27 -03:00
LUIS NOVO
b89250d3ca temporary fix to config cache 2024-11-01 17:06:10 -03:00
LUIS NOVO
c65bf8ba12 rename model_name to model_id 2024-11-01 12:07:00 -03:00
LUIS NOVO
8bb5db158f implement model config 2024-10-30 14:09:24 -03:00
LUIS NOVO
1002c6b4eb organize data folders 2024-10-26 18:54:54 -03:00
LUIS NOVO
9042b08ae3 add model router and improve prompts 2024-10-22 18:24:24 -03:00
LUIS NOVO
bcd260a28b Initial commit with all features 2024-10-21 14:56:10 -03:00