v1.0.7: Fixed session_key bug in chunk_messages()
This commit is contained in:
14
CHANGELOG.md
14
CHANGELOG.md
@@ -2,6 +2,20 @@
|
|||||||
|
|
||||||
All notable changes to the OpenClaw RAG Knowledge System will be documented in this file.
|
All notable changes to the OpenClaw RAG Knowledge System will be documented in this file.
|
||||||
|
|
||||||
|
## [1.0.7] - 2026-02-14
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- **Bug in chunk_messages()**: Fixed undefined variable `session_key` referenced in metadata generation
|
||||||
|
- Added `session_key` parameter to `chunk_messages()` function signature
|
||||||
|
- Fixed bug identified in ClawHub security scan report
|
||||||
|
- Pass `session_key` from ingestion loop to chunk_messages() call
|
||||||
|
- Resolves scope issue where function referenced non-existent variable
|
||||||
|
|
||||||
|
### Security
|
||||||
|
- Fixes code quality issue identified in security scan (bug in implementation)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## [1.0.6] - 2026-02-14
|
## [1.0.6] - 2026-02-14
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ def format_content(content) -> str:
|
|||||||
|
|
||||||
def chunk_messages(
|
def chunk_messages(
|
||||||
messages: List[Dict],
|
messages: List[Dict],
|
||||||
|
session_key: str,
|
||||||
context_window: int = 20,
|
context_window: int = 20,
|
||||||
overlap: int = 5
|
overlap: int = 5
|
||||||
) -> List[Dict]:
|
) -> List[Dict]:
|
||||||
@@ -135,6 +136,7 @@ def chunk_messages(
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
messages: List of message objects
|
messages: List of message objects
|
||||||
|
session_key: Session identifier for metadata
|
||||||
context_window: Messages per chunk
|
context_window: Messages per chunk
|
||||||
overlap: Message overlap between chunks
|
overlap: Message overlap between chunks
|
||||||
|
|
||||||
@@ -244,7 +246,7 @@ def ingest_sessions(
|
|||||||
print(f" Messages: {len(messages)}")
|
print(f" Messages: {len(messages)}")
|
||||||
|
|
||||||
# Chunk messages
|
# Chunk messages
|
||||||
chunks = chunk_messages(messages, chunk_size, chunk_overlap)
|
chunks = chunk_messages(messages, session_key, chunk_size, chunk_overlap)
|
||||||
|
|
||||||
if not chunks:
|
if not chunks:
|
||||||
print(f" ⚠️ No valid chunks, skipping")
|
print(f" ⚠️ No valid chunks, skipping")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rag-openclaw",
|
"name": "rag-openclaw",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"description": "RAG Knowledge System for OpenClaw - Semantic search across chat history, code, docs, and skills with automatic memory retrieval",
|
"description": "RAG Knowledge System for OpenClaw - Semantic search across chat history, code, docs, and skills with automatic memory retrieval",
|
||||||
"homepage": "https://openclaw-rag-skill.projects.theta42.com",
|
"homepage": "https://openclaw-rag-skill.projects.theta42.com",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
Reference in New Issue
Block a user