Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f5940c55f7 | |||
| 476d7eec2d |
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
|
||||||
|
|||||||
26
SKILL.md
26
SKILL.md
@@ -18,6 +18,32 @@ This skill provides a complete RAG (Retrieval-Augmented Generation) system for O
|
|||||||
- 💾 Local ChromaDB storage (no API keys required)
|
- 💾 Local ChromaDB storage (no API keys required)
|
||||||
- 🚀 Automatic AI integration – retrieves context transparently
|
- 🚀 Automatic AI integration – retrieves context transparently
|
||||||
|
|
||||||
|
## For Nova (AI Assistant) - How to Query RAG
|
||||||
|
|
||||||
|
**IMPORTANT:** The `memory_search` tool in OpenClaw is a SEPARATE system that requires external API keys (OpenAI/Google/Voyage). Do NOT use it.
|
||||||
|
|
||||||
|
**Use the RAG skill scripts directly:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Quick search (returns top 10 results)
|
||||||
|
python3 ~/.openclaw/workspace/skills/rag-openclaw/rag_query.py "your search query"
|
||||||
|
|
||||||
|
# Search with type filter
|
||||||
|
python3 ~/.openclaw/workspace/skills/rag-openclaw/rag_query.py "SIP voip" --type session
|
||||||
|
python3 ~/.openclaw/workspace/skills/rag-openclaw/rag_query.py "porkbun DNS" --type skill
|
||||||
|
|
||||||
|
# Check what's indexed
|
||||||
|
python3 ~/.openclaw/workspace/skills/rag-openclaw/rag_manage.py stats
|
||||||
|
```
|
||||||
|
|
||||||
|
**When to use RAG:**
|
||||||
|
- Before answering questions about past work, decisions, or context
|
||||||
|
- When the user says "remember when..." or "we set up..."
|
||||||
|
- When you need to recall configurations, credentials, or setup details
|
||||||
|
- Whendebugging - search for how similar issues were solved before
|
||||||
|
|
||||||
|
The RAG uses local embeddings (all-MiniLM-L6-v2) and requires no external API keys.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|||||||
@@ -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