memorisdk 1.0.2__py3-none-any.whl → 2.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of memorisdk might be problematic. Click here for more details.
- memori/__init__.py +24 -8
- memori/agents/conscious_agent.py +252 -414
- memori/agents/memory_agent.py +487 -224
- memori/agents/retrieval_agent.py +491 -68
- memori/config/memory_manager.py +323 -0
- memori/core/conversation.py +393 -0
- memori/core/database.py +386 -371
- memori/core/memory.py +1683 -532
- memori/core/providers.py +217 -0
- memori/database/adapters/__init__.py +10 -0
- memori/database/adapters/mysql_adapter.py +331 -0
- memori/database/adapters/postgresql_adapter.py +291 -0
- memori/database/adapters/sqlite_adapter.py +229 -0
- memori/database/auto_creator.py +320 -0
- memori/database/connection_utils.py +207 -0
- memori/database/connectors/base_connector.py +283 -0
- memori/database/connectors/mysql_connector.py +240 -18
- memori/database/connectors/postgres_connector.py +277 -4
- memori/database/connectors/sqlite_connector.py +178 -3
- memori/database/models.py +400 -0
- memori/database/queries/base_queries.py +1 -1
- memori/database/queries/memory_queries.py +91 -2
- memori/database/query_translator.py +222 -0
- memori/database/schema_generators/__init__.py +7 -0
- memori/database/schema_generators/mysql_schema_generator.py +215 -0
- memori/database/search/__init__.py +8 -0
- memori/database/search/mysql_search_adapter.py +255 -0
- memori/database/search/sqlite_search_adapter.py +180 -0
- memori/database/search_service.py +700 -0
- memori/database/sqlalchemy_manager.py +888 -0
- memori/integrations/__init__.py +36 -11
- memori/integrations/litellm_integration.py +340 -6
- memori/integrations/openai_integration.py +506 -240
- memori/tools/memory_tool.py +94 -4
- memori/utils/input_validator.py +395 -0
- memori/utils/pydantic_models.py +138 -36
- memori/utils/query_builder.py +530 -0
- memori/utils/security_audit.py +594 -0
- memori/utils/security_integration.py +339 -0
- memori/utils/transaction_manager.py +547 -0
- {memorisdk-1.0.2.dist-info → memorisdk-2.0.1.dist-info}/METADATA +56 -23
- memorisdk-2.0.1.dist-info/RECORD +66 -0
- memori/scripts/llm_text.py +0 -50
- memorisdk-1.0.2.dist-info/RECORD +0 -44
- memorisdk-1.0.2.dist-info/entry_points.txt +0 -2
- {memorisdk-1.0.2.dist-info → memorisdk-2.0.1.dist-info}/WHEEL +0 -0
- {memorisdk-1.0.2.dist-info → memorisdk-2.0.1.dist-info}/licenses/LICENSE +0 -0
- {memorisdk-1.0.2.dist-info → memorisdk-2.0.1.dist-info}/top_level.txt +0 -0
memori/__init__.py
CHANGED
|
@@ -5,13 +5,11 @@ Professional-grade memory layer with comprehensive error handling, configuration
|
|
|
5
5
|
management, and modular architecture for production AI systems.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = "
|
|
8
|
+
__version__ = "2.0.1"
|
|
9
9
|
__author__ = "Harshal More"
|
|
10
10
|
__email__ = "harshalmore2468@gmail.com"
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
from .agents.memory_agent import MemoryAgent
|
|
14
|
-
from .agents.retrieval_agent import MemorySearchEngine
|
|
12
|
+
from typing import Any, Optional
|
|
15
13
|
|
|
16
14
|
# Configuration system
|
|
17
15
|
from .config import (
|
|
@@ -72,7 +70,22 @@ from .utils import ( # Pydantic models; Enhanced exceptions; Validators and hel
|
|
|
72
70
|
get_logger,
|
|
73
71
|
)
|
|
74
72
|
|
|
75
|
-
|
|
73
|
+
# Memory agents (dynamically imported to avoid import errors)
|
|
74
|
+
MemoryAgent: Optional[Any] = None
|
|
75
|
+
MemorySearchEngine: Optional[Any] = None
|
|
76
|
+
_AGENTS_AVAILABLE = False
|
|
77
|
+
|
|
78
|
+
try:
|
|
79
|
+
from .agents.memory_agent import MemoryAgent
|
|
80
|
+
from .agents.retrieval_agent import MemorySearchEngine
|
|
81
|
+
|
|
82
|
+
_AGENTS_AVAILABLE = True
|
|
83
|
+
except ImportError:
|
|
84
|
+
# Agents are not available, use placeholder None values
|
|
85
|
+
pass
|
|
86
|
+
|
|
87
|
+
# Build __all__ list dynamically based on available components
|
|
88
|
+
_all_components = [
|
|
76
89
|
# Core
|
|
77
90
|
"Memori",
|
|
78
91
|
"DatabaseManager",
|
|
@@ -82,9 +95,6 @@ __all__ = [
|
|
|
82
95
|
"AgentSettings",
|
|
83
96
|
"LoggingSettings",
|
|
84
97
|
"ConfigManager",
|
|
85
|
-
# Agents
|
|
86
|
-
"MemoryAgent",
|
|
87
|
-
"MemorySearchEngine",
|
|
88
98
|
# Database
|
|
89
99
|
"SQLiteConnector",
|
|
90
100
|
"PostgreSQLConnector",
|
|
@@ -138,3 +148,9 @@ __all__ = [
|
|
|
138
148
|
"LoggingManager",
|
|
139
149
|
"get_logger",
|
|
140
150
|
]
|
|
151
|
+
|
|
152
|
+
# Add agents only if available
|
|
153
|
+
if _AGENTS_AVAILABLE:
|
|
154
|
+
_all_components.extend(["MemoryAgent", "MemorySearchEngine"])
|
|
155
|
+
|
|
156
|
+
__all__ = _all_components
|