12 Commits

Author SHA1 Message Date
mtayfur
4502e07fb3 chore(memory_system): bump version to 1.2.0 in metadata header
Update reflects new changes or improvements since the previous 1.0.0
release, ensuring versioning stays accurate and aligned with project
progress.
2025-11-24 16:06:03 +03:00
mtayfur
bc5611a6d0 refactor(memory_system): simplify embedding normalization, memory retrieval, and response decoding logic
Redundant checks and exception handling are removed to streamline code paths, making embedding normalization, user memory retrieval, and LLM response decoding more concise and maintainable while preserving error propagation at higher levels.
2025-11-24 15:59:55 +03:00
mtayfur
3b84f64392 refactor: make skip detection and embedding operations fully async for improved concurrency
Skip detection and embedding-related methods are now asynchronous, allowing
non-blocking execution and better concurrency; embedding function wrappers
and initialization routines are updated to support async/await, and
shared skip detector caching is adapted accordingly. These changes are
necessary to ensure compatibility with async embedding functions, prevent
blocking the event loop, and improve scalability and responsiveness in
high-concurrency environments.
2025-11-24 15:45:03 +03:00
mtayfur
960f8ce4a9 feat(memory_system): introduce "Intermediate" status level for more granular status emission control
Adds an "Intermediate" status level between "Basic" and "Detailed" to provide
summaries and key details, updates all relevant mappings and usages to support
this new level, and adjusts default verbosity for status messages to improve
clarity and reduce noise for users who do not require full diagnostics.
2025-11-15 21:52:25 +03:00
mtayfur
6ae99d4778 refactor(memory): remove redundant valve options and clarify reranking controls
Eliminate unused or redundant valve options such as max_message_chars,
relaxed_semantic_threshold_multiplier, and enable_llm_reranking to
streamline configuration, clarify that llm_reranking_trigger_multiplier
disables reranking when set to 0.0, and update documentation and code to
reflect these changes for improved maintainability and user clarity.
2025-11-09 16:52:56 +03:00
mtayfur
c77237a651 feat(memory_system): make skip category margin configurable via Filter settings
Allowing skip_category_margin to be set in Filter enables dynamic
adjustment of skip detection sensitivity, improving flexibility for
different deployment scenarios.
2025-11-09 15:43:30 +03:00
mtayfur
aaaf848c1e refactor(memory_system): remove "Intermediate" status level and update status emission logic
Eliminates the "Intermediate" status level for message verbosity, consolidating to "Basic" and "Detailed" for clarity and simplicity; updates all related mappings, enums, and status emission calls to reflect this streamlined approach, reducing confusion and improving maintainability.
2025-11-09 14:31:27 +03:00
mtayfur
cfc4dca6fc feat(memory_system): expand skip and personal category descriptions and improve skip state caching logic
Category descriptions are made more comprehensive and precise to improve classification accuracy, the skip margin is adjusted for better thresholding, and skip state caching is now performed before early returns to ensure consistent cache updates regardless of skip conditions. The user message extraction logic is also improved for robustness.
2025-11-07 17:43:58 +03:00
mtayfur
ff6052fd41 feat(memory_system): add configurable status message verbosity levels
Introduce status_emit_level to control status message verbosity, allowing
users to select Basic, Intermediate, or Detailed output; refactor all
status emission calls to respect this setting, improving clarity and
customizability of system feedback for different user needs.
2025-11-07 00:19:50 +03:00
mtayfur
eca65fef43 fix: increase SKIP_CATEGORY_MARGIN for skip category classification to 0.15
The SKIP_CATEGORY_MARGIN constant is raised from 0.10 to 0.15 to make skip
category classification more selective, reducing false positives by requiring
a higher margin above personal similarity.
2025-11-04 01:45:26 +03:00
mtayfur
8997f71f05 refactor(memory_system): remove excessive try/except and input validation, streamline async operations, and add skip state cache
Removes redundant try/except blocks and input validation in several
methods to simplify logic and improve readability. Moves error handling
to higher levels where appropriate. Adds a skip state cache to track
when memory operations should be skipped, improving efficiency by
avoiding repeated skip checks. Cleans up batch operation execution and
cache clearing to include the new skip state. These changes reduce
unnecessary code complexity and improve maintainability, while also
optimizing memory operation flow and cache management.
2025-10-28 17:51:09 +03:00
mtayfur
8ced9aace5 feat(skip-detection): expand and reorganize non-personal category descriptions for improved coverage and clarity
refactor(skip-detection): condense and generalize personal category descriptions for maintainability and easier updates

fix(constants): lower SKIP_CATEGORY_MARGIN from 0.20 to 0.10 to reduce false positives in skip classification

refactor(skip-detection): clarify logging for skip/allow decisions and threshold calculation for better traceability

refactor: use consistent double-quote style for operator and code-ending character lists

fix(filter): ensure embeddings are normalized before use in skip detector to improve classification accuracy

Non-personal category descriptions are now more comprehensive and organized by topic, improving the classifier's ability to detect impersonal content. Personal category descriptions are condensed into broader, clearer categories, making them easier to maintain and update. The SKIP_CATEGORY_MARGIN is reduced to make the skip detector less aggressive, addressing previous false positives. Logging is improved for easier debugging and understanding of skip decisions. Embedding normalization is enforced to ensure consistent similarity calculations.
2025-10-28 17:23:20 +03:00
3 changed files with 335 additions and 345 deletions

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.12

View File

@@ -67,12 +67,11 @@ Uses OpenWebUI's configured embedding model (supports Ollama, OpenAI, Azure Open
Customize behavior through valves:
- **model**: LLM for consolidation and reranking. Set to "Default" to use the current chat model, or specify a model ID to use that specific model
- **max_message_chars**: Maximum message length before skipping operations (default: 2500)
- **max_memories_returned**: Context injection limit (default: 10)
- **semantic_retrieval_threshold**: Minimum similarity score (default: 0.5)
- **relaxed_semantic_threshold_multiplier**: Adjusts threshold for consolidation (default: 0.9)
- **enable_llm_reranking**: Toggle smart reranking (default: true)
- **llm_reranking_trigger_multiplier**: When to activate LLM reranking (default: 0.5 = 50%)
- **llm_reranking_trigger_multiplier**: When to activate LLM reranking (0.0 = disabled, default: 0.5 = 50%)
- **skip_category_margin**: Margin for skip detection classification (default: 0.20)
- **status_emit_level**: Status message verbosity - Basic or Detailed (default: Detailed)
## Performance Optimizations

File diff suppressed because it is too large Load Diff