You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+97-10Lines changed: 97 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,10 @@ This package provides an idiomatic Python interface to the VikingDB v2 data-plan
4
4
5
5
### Key Features
6
6
- Simple client configuration with AK/SK signing (Volcano Engine V4) or API-key authentication.
7
-
- Request envelope handling with typed request/response models covering collection, index, and embedding workflows.
7
+
-**Vector Database**: Request envelope handling with typed request/response models covering collection, index, and embedding workflows.
8
+
-**Memory Management**: Conversational memory APIs for managing user profiles, events, and session messages with semantic search capabilities.
8
9
- Pluggable retry strategy (exponential backoff with jitter) and per-request overrides (`RequestOptions`).
9
-
- Executable example guides (`pytest` integration tests) that demonstrate connectivity, CRUD, search, analytics, and embedding scenarios against a real VikingDB environment.
10
+
- Executable example guides (`pytest` integration tests and standalone scripts) that demonstrate connectivity, CRUD, search, analytics, embedding, and memory management scenarios against a real VikingDB environment.
10
11
11
12
### Installation
12
13
@@ -20,6 +21,8 @@ pip install -e .
20
21
21
22
### Quickstart
22
23
24
+
#### Vector Database
25
+
23
26
```python
24
27
from vikingdb importIAM
25
28
from vikingdb.vector import UpsertDataRequest, VikingVector
The integration guides under `examples/vector` mirror the Go SDK walkthroughs (`E1`–`E5`). Each test connects to a live VikingDB environment and exercises a specific workflow.
57
104
@@ -86,21 +133,46 @@ The integration guides under `examples/vector` mirror the Go SDK walkthroughs (`
86
133
87
134
Each scenario writes temporary documents using unique session tags and cleans them up afterwards.
88
135
136
+
#### Memory Examples
137
+
138
+
The memory examples under `examples/memory` demonstrate the core workflows for managing conversational memories:
139
+
140
+
1.**01_init_client_and_collection.py**: Initialize the VikingMem client and get collection instances using either collection name + project name or resource ID.
141
+
142
+
2.**02_add_session.py**: Add session messages (user-assistant conversations) to the memory collection with metadata such as user ID, assistant ID, and timestamps.
143
+
144
+
3.**03_search_memory.py**: Search memories with various filters including:
-`vikingdb._client`, `vikingdb.auth`, `vikingdb.request_options`, and `vikingdb.vector.exceptions` form the shared runtime used by all present and future SDK domains (vector, memory, knowledge).
92
-
- Domain-specific features live under dedicated namespaces such as `vikingdb.vector`, where the high-level `VikingVector` client composes the shared auth stack atop the shared client.
165
+
- Domain-specific features live under dedicated namespaces such as `vikingdb.vector` and `vikingdb.memory`, where the high-level clients (`VikingVector`, `VikingMem`) compose the shared auth stack atop the shared client.
93
166
- Vector request/response models now surface directly from `vikingdb.vector` (backed internally by `vikingdb/vector/models`).
94
-
- Imports from the root package now focus on cross-cutting utilities (auth, config, request options), while application code should pull vector functionality from `vikingdb.vector` explicitly.
167
+
- Memory APIs return plain dictionaries without object encapsulation, providing a lightweight interface for conversational memory management (session, profile, event operations).
168
+
- Imports from the root package now focus on cross-cutting utilities (auth, config, request options), while application code should pull domain-specific functionality from `vikingdb.vector` or `vikingdb.memory` explicitly.
95
169
96
170
### Project Structure
97
171
98
172
```
99
173
vikingdb/
100
174
├── _client.py # Shared base client built on volcengine Service
0 commit comments