cortexdbai 0.2.1__tar.gz → 0.2.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cortexdbai
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: The Long-Term Memory Layer for AI Systems
5
5
  Project-URL: Homepage, https://cortexdb.ai
6
6
  Project-URL: Documentation, https://docs.cortexdb.ai
@@ -67,7 +67,7 @@ from cortexdb.models import (
67
67
  VisibilityLevel,
68
68
  )
69
69
 
70
- __version__ = "0.2.1"
70
+ __version__ = "0.2.2"
71
71
  __all__ = [
72
72
  # v1 surface (recommended for new apps)
73
73
  "v1",
@@ -1,60 +1,60 @@
1
- """CortexDB v1 Python SDK.
2
-
3
- The v1 API surface uses scope paths (``org:foo/user:bar``), the
4
- ``ExperienceEnvelope`` shape on write, the stratified ``StratifiedPack``
5
- shape on recall, and PASETO/JWT bearer auth (with ``X-Cortex-Actor``
6
- required on every request).
7
-
8
- Quick start:
9
-
10
- .. code-block:: python
11
-
12
- from cortexdb.v1 import V1Client
13
-
14
- client = V1Client(
15
- api_url="https://api.cortexdb.ai", # or http://localhost:3142 for v1 surface
16
- actor="user:alice",
17
- bearer="eyJ...", # PASETO v4 public or JWT (RS256/ES256)
18
- )
19
-
20
- # Ingest
21
- client.experience_bulk("org:initech/user:alice", [
22
- {"role": "user", "text": "I love coffee in the morning"},
23
- ])
24
-
25
- # Recall
26
- pack = client.recall("org:initech/user:alice", query="What does Alice drink?")
27
-
28
- # Answer
29
- out = client.answer(
30
- "org:initech/user:alice",
31
- question="What does Alice drink?",
32
- question_type="single-session-user",
33
- )
34
- print(out["answer"])
35
- """
36
-
37
- from cortexdb.v1.client import AsyncV1Client, V1Client
38
- from cortexdb.v1.exceptions import (
39
- V1APIError,
40
- V1AuthError,
41
- V1ConnectionError,
42
- V1Error,
43
- V1NotConfiguredError,
44
- V1PolicyDeniedError,
45
- V1RateLimitError,
46
- V1TimeoutError,
47
- )
48
-
49
- __all__ = [
50
- "V1Client",
51
- "AsyncV1Client",
52
- "V1Error",
53
- "V1APIError",
54
- "V1AuthError",
55
- "V1ConnectionError",
56
- "V1TimeoutError",
57
- "V1RateLimitError",
58
- "V1NotConfiguredError",
59
- "V1PolicyDeniedError",
60
- ]
1
+ """CortexDB v1 Python SDK.
2
+
3
+ The v1 API surface uses scope paths (``org:foo/user:bar``), the
4
+ ``ExperienceEnvelope`` shape on write, the stratified ``StratifiedPack``
5
+ shape on recall, and PASETO/JWT bearer auth (with ``X-Cortex-Actor``
6
+ required on every request).
7
+
8
+ Quick start:
9
+
10
+ .. code-block:: python
11
+
12
+ from cortexdb.v1 import V1Client
13
+
14
+ client = V1Client(
15
+ api_url="https://api.cortexdb.ai", # or http://localhost:3142 for v1 surface
16
+ actor="user:alice",
17
+ bearer="eyJ...", # PASETO v4 public or JWT (RS256/ES256)
18
+ )
19
+
20
+ # Ingest
21
+ client.experience_bulk("org:initech/user:alice", [
22
+ {"role": "user", "text": "I love coffee in the morning"},
23
+ ])
24
+
25
+ # Recall
26
+ pack = client.recall("org:initech/user:alice", query="What does Alice drink?")
27
+
28
+ # Answer
29
+ out = client.answer(
30
+ "org:initech/user:alice",
31
+ question="What does Alice drink?",
32
+ question_type="single-session-user",
33
+ )
34
+ print(out["answer"])
35
+ """
36
+
37
+ from cortexdb.v1.client import AsyncV1Client, V1Client
38
+ from cortexdb.v1.exceptions import (
39
+ V1APIError,
40
+ V1AuthError,
41
+ V1ConnectionError,
42
+ V1Error,
43
+ V1NotConfiguredError,
44
+ V1PolicyDeniedError,
45
+ V1RateLimitError,
46
+ V1TimeoutError,
47
+ )
48
+
49
+ __all__ = [
50
+ "V1Client",
51
+ "AsyncV1Client",
52
+ "V1Error",
53
+ "V1APIError",
54
+ "V1AuthError",
55
+ "V1ConnectionError",
56
+ "V1TimeoutError",
57
+ "V1RateLimitError",
58
+ "V1NotConfiguredError",
59
+ "V1PolicyDeniedError",
60
+ ]