feat: allow agents to use advanced input and search for information
Some checks failed
Tests / test (macos-latest, 3.10) (push) Waiting to run
Tests / test (macos-latest, 3.11) (push) Waiting to run
Tests / test (macos-latest, 3.12) (push) Waiting to run
Tests / test (windows-latest, 3.10) (push) Waiting to run
Tests / test (windows-latest, 3.11) (push) Waiting to run
Tests / test (windows-latest, 3.12) (push) Waiting to run
Lint / lint (push) Failing after 26s
Tests / test (ubuntu-latest, 3.10) (push) Failing after 45s
Tests / test (ubuntu-latest, 3.11) (push) Failing after 41s
Tests / test (ubuntu-latest, 3.12) (push) Failing after 1m12s

feat: save user messages to improve agent responses
refactor: pass database connection to knowledge store
maintenance: bump version to 1.30.0
This commit is contained in:
retoor 2025-11-08 02:30:11 +01:00
parent 164510896e
commit 26b4797577
4 changed files with 12 additions and 4 deletions

View File

@ -25,6 +25,14 @@
## Version 1.29.0 - 2025-11-08
Agents can now use more advanced input and automatically search for relevant information. User messages are saved and used to improve agent responses.
**Changes:** 5 files, 58 lines
**Languages:** Markdown (9 lines), Python (47 lines), TOML (2 lines)
## Version 1.28.0 - 2025-11-08 ## Version 1.28.0 - 2025-11-08

View File

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "rp" name = "rp"
version = "1.28.0" version = "1.29.0"
description = "R python edition. The ultimate autonomous AI CLI." description = "R python edition. The ultimate autonomous AI CLI."
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"

View File

@ -109,7 +109,7 @@ class Assistant:
self.last_result = None self.last_result = None
self.init_database() self.init_database()
from rp.memory import KnowledgeStore, FactExtractor from rp.memory import KnowledgeStore, FactExtractor
self.knowledge_store = KnowledgeStore(DB_PATH) self.knowledge_store = KnowledgeStore(DB_PATH, db_conn=self.db_conn)
self.fact_extractor = FactExtractor() self.fact_extractor = FactExtractor()
self.messages.append(init_system_message(args)) self.messages.append(init_system_message(args))
try: try:

View File

@ -34,9 +34,9 @@ class KnowledgeEntry:
class KnowledgeStore: class KnowledgeStore:
def __init__(self, db_path: str): def __init__(self, db_path: str, db_conn: Optional[sqlite3.Connection] = None):
self.db_path = db_path self.db_path = db_path
self.conn = sqlite3.connect(self.db_path, check_same_thread=False) self.conn = db_conn if db_conn else sqlite3.connect(self.db_path, check_same_thread=False)
self.lock = threading.Lock() self.lock = threading.Lock()
self.semantic_index = SemanticIndex() self.semantic_index = SemanticIndex()
self._initialize_store() self._initialize_store()