smartmemory-client 0.5.0__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.
@@ -0,0 +1,61 @@
1
+ """
2
+ SmartMemory Python Client
3
+
4
+ Official Python client for the SmartMemory Service API.
5
+
6
+ Installation:
7
+ pip install smartmemory-client
8
+
9
+ Usage:
10
+ from smartmemory_client import SmartMemoryClient
11
+
12
+ client = SmartMemoryClient(
13
+ base_url="http://localhost:9001",
14
+ api_key="your_jwt_token"
15
+ )
16
+
17
+ # Add memory
18
+ item_id = client.add("Test memory")
19
+
20
+ # Search
21
+ results = client.search("test", top_k=5)
22
+
23
+ # Ingest
24
+ result = client.ingest(
25
+ content="Complex content",
26
+ extractor_name="llm",
27
+ context={"key": "value"}
28
+ )
29
+
30
+ For more information:
31
+ https://github.com/smartmemory/smart-memory-client
32
+ https://docs.smartmemory.dev
33
+ """
34
+
35
+ from smartmemory_client.client import SmartMemoryClient, SmartMemoryClientError
36
+ from smartmemory_client.models import MemoryItem, ConversationContextModel
37
+
38
+ try:
39
+ from importlib.metadata import version, PackageNotFoundError
40
+
41
+ try:
42
+ __version__ = version("smartmemory-client")
43
+ except PackageNotFoundError:
44
+ # Package not installed, try reading VERSION file (development mode)
45
+ from pathlib import Path
46
+
47
+ version_file = Path(__file__).parent.parent / "VERSION"
48
+ try:
49
+ __version__ = version_file.read_text().strip()
50
+ except FileNotFoundError:
51
+ __version__ = "0.0.0-dev"
52
+ except ImportError:
53
+ __version__ = "0.0.0-dev"
54
+
55
+ __all__ = [
56
+ "SmartMemoryClient",
57
+ "SmartMemoryClientError",
58
+ "MemoryItem",
59
+ "ConversationContextModel",
60
+ "__version__",
61
+ ]