recallrai 0.1.1__tar.gz → 0.2.0__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.
Potentially problematic release.
This version of recallrai might be problematic. Click here for more details.
- {recallrai-0.1.1 → recallrai-0.2.0}/PKG-INFO +4 -5
- {recallrai-0.1.1 → recallrai-0.2.0}/pyproject.toml +7 -5
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/__init__.py +1 -4
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/client.py +1 -4
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/exceptions/base.py +1 -3
- recallrai-0.2.0/recallrai/models/__init__.py +16 -0
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/models/session.py +7 -11
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/models/user.py +6 -10
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/session.py +2 -5
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/user.py +1 -1
- recallrai-0.2.0/recallrai/utils/__init__.py +8 -0
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/utils/http_client.py +3 -3
- recallrai-0.1.1/recallrai/models/__init__.py +0 -16
- recallrai-0.1.1/recallrai/utils/__init__.py +0 -8
- {recallrai-0.1.1 → recallrai-0.2.0}/README.md +0 -0
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/exceptions/__init__.py +0 -0
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/exceptions/auth.py +0 -0
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/exceptions/network.py +0 -0
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/exceptions/server.py +0 -0
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/exceptions/sessions.py +0 -0
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/exceptions/users.py +0 -0
- {recallrai-0.1.1 → recallrai-0.2.0}/recallrai/exceptions/validation.py +0 -0
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: recallrai
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Official Python SDK for RecallrAI - Revolutionary contextual memory system that enables AI assistants to form meaningful connections between conversations, just like human memory.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: ai,memory,context,llm,mem0,getzep,zep
|
|
7
7
|
Author: Devasheesh Mishra
|
|
8
8
|
Author-email: devasheeshmishra4@gmail.com
|
|
9
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.9,<3.14
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
-
Requires-Dist: httpx (>=0.
|
|
21
|
-
Requires-Dist: pydantic (>=2.
|
|
19
|
+
Requires-Dist: httpx (>=0.28.1,<0.29.0)
|
|
20
|
+
Requires-Dist: pydantic (>=2.11.1,<3.0.0)
|
|
22
21
|
Project-URL: Homepage, https://recallrai.com
|
|
23
22
|
Project-URL: Repository, https://github.com/recallrai/sdk-python
|
|
24
23
|
Description-Content-Type: text/markdown
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "recallrai"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.2.0"
|
|
4
4
|
description = "Official Python SDK for RecallrAI - Revolutionary contextual memory system that enables AI assistants to form meaningful connections between conversations, just like human memory."
|
|
5
5
|
authors = ["Devasheesh Mishra <devasheeshmishra4@gmail.com>"]
|
|
6
6
|
license = "MIT License"
|
|
@@ -10,10 +10,11 @@ keywords = ["ai", "memory", "context", "llm", "mem0", "getzep", "zep"]
|
|
|
10
10
|
homepage = "https://recallrai.com"
|
|
11
11
|
classifiers = [
|
|
12
12
|
"Programming Language :: Python :: 3",
|
|
13
|
-
"Programming Language :: Python :: 3.8",
|
|
14
13
|
"Programming Language :: Python :: 3.9",
|
|
15
14
|
"Programming Language :: Python :: 3.10",
|
|
16
15
|
"Programming Language :: Python :: 3.11",
|
|
16
|
+
"Programming Language :: Python :: 3.12",
|
|
17
|
+
"Programming Language :: Python :: 3.13",
|
|
17
18
|
"License :: OSI Approved :: MIT License",
|
|
18
19
|
"Operating System :: OS Independent",
|
|
19
20
|
"Intended Audience :: Developers",
|
|
@@ -21,13 +22,14 @@ classifiers = [
|
|
|
21
22
|
package-mode = true
|
|
22
23
|
|
|
23
24
|
[tool.poetry.dependencies]
|
|
24
|
-
python = ">=3.
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
python = ">=3.9,<3.14"
|
|
26
|
+
pydantic = "^2.11.1"
|
|
27
|
+
httpx = "^0.28.1"
|
|
27
28
|
|
|
28
29
|
[tool.poetry.group.dev.dependencies]
|
|
29
30
|
twine = "^5.1.1"
|
|
30
31
|
ipykernel = "^6.29.5"
|
|
32
|
+
openai = "^1.95.1"
|
|
31
33
|
|
|
32
34
|
[build-system]
|
|
33
35
|
requires = ["poetry-core"]
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
# Path: recallrai/__init__.py
|
|
2
|
-
# Description: Package initialization file with SDK version and main class exports
|
|
3
|
-
|
|
4
1
|
"""
|
|
5
2
|
RecallrAI Python SDK
|
|
6
3
|
|
|
@@ -11,7 +8,7 @@ from .client import RecallrAI
|
|
|
11
8
|
from .user import User
|
|
12
9
|
from .session import Session
|
|
13
10
|
|
|
14
|
-
__version__ = "0.
|
|
11
|
+
__version__ = "0.2.0"
|
|
15
12
|
|
|
16
13
|
__all__ = [
|
|
17
14
|
"RecallrAI",
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
# Path: recallrai/client.py
|
|
2
|
-
# Description: Main client class for the RecallrAI SDK
|
|
3
|
-
|
|
4
1
|
"""
|
|
5
2
|
Main client class for the RecallrAI SDK.
|
|
6
3
|
|
|
@@ -8,7 +5,7 @@ This module provides the RecallrAI class, which is the primary interface for the
|
|
|
8
5
|
"""
|
|
9
6
|
|
|
10
7
|
from typing import Any, Dict, Optional
|
|
11
|
-
from .models import
|
|
8
|
+
from .models import UserModel, UserList
|
|
12
9
|
from .user import User
|
|
13
10
|
from .utils import HTTPClient
|
|
14
11
|
from .exceptions import (
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Models used in the SDK.
|
|
3
|
+
"""
|
|
4
|
+
from .session import Context, Message, MessageRole, SessionModel, SessionList, SessionStatus
|
|
5
|
+
from .user import UserModel, UserList
|
|
6
|
+
|
|
7
|
+
__all__ = [
|
|
8
|
+
"UserModel",
|
|
9
|
+
"UserList",
|
|
10
|
+
"SessionModel",
|
|
11
|
+
"SessionList",
|
|
12
|
+
"SessionStatus",
|
|
13
|
+
"Message",
|
|
14
|
+
"MessageRole",
|
|
15
|
+
"Context",
|
|
16
|
+
]
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
# Path: recallrai/models/session.py
|
|
2
|
-
# Description: Session data models for the RecallrAI SDK
|
|
3
|
-
|
|
4
1
|
"""
|
|
5
2
|
Session-related data models for the RecallrAI SDK.
|
|
6
3
|
"""
|
|
7
4
|
|
|
8
5
|
import enum, uuid
|
|
9
6
|
from datetime import datetime
|
|
10
|
-
from typing import Any, Dict, List
|
|
7
|
+
from typing import Any, Dict, List
|
|
11
8
|
|
|
12
9
|
from pydantic import BaseModel, Field
|
|
13
10
|
|
|
@@ -45,7 +42,7 @@ class SessionStatus(str, enum.Enum):
|
|
|
45
42
|
PROCESSED = "processed"
|
|
46
43
|
|
|
47
44
|
|
|
48
|
-
class
|
|
45
|
+
class SessionModel(BaseModel):
|
|
49
46
|
"""
|
|
50
47
|
Represents a conversation session.
|
|
51
48
|
"""
|
|
@@ -62,21 +59,20 @@ class Session(BaseModel):
|
|
|
62
59
|
}
|
|
63
60
|
|
|
64
61
|
@classmethod
|
|
65
|
-
def from_api_response(cls, data: Dict[str, Any]) -> "
|
|
62
|
+
def from_api_response(cls, data: Dict[str, Any]) -> "SessionModel":
|
|
66
63
|
"""
|
|
67
|
-
Create a
|
|
64
|
+
Create a SessionModel instance from an API response.
|
|
68
65
|
|
|
69
66
|
Args:
|
|
70
67
|
data: API response data
|
|
71
68
|
|
|
72
69
|
Returns:
|
|
73
|
-
A
|
|
70
|
+
A SessionModel instance
|
|
74
71
|
"""
|
|
75
72
|
return cls(
|
|
76
73
|
session_id=data["session_id"],
|
|
77
74
|
status=data.get("status", SessionStatus.PENDING),
|
|
78
75
|
created_at=data.get("created_at", datetime.now()),
|
|
79
|
-
messages=None
|
|
80
76
|
)
|
|
81
77
|
|
|
82
78
|
|
|
@@ -84,7 +80,7 @@ class SessionList(BaseModel):
|
|
|
84
80
|
"""
|
|
85
81
|
Represents a paginated list of sessions.
|
|
86
82
|
"""
|
|
87
|
-
sessions: List[
|
|
83
|
+
sessions: List[SessionModel] = Field(..., description="List of sessions")
|
|
88
84
|
total: int = Field(..., description="Total number of sessions")
|
|
89
85
|
has_more: bool = Field(..., description="Whether there are more sessions to fetch")
|
|
90
86
|
|
|
@@ -104,7 +100,7 @@ class SessionList(BaseModel):
|
|
|
104
100
|
A SessionList instance
|
|
105
101
|
"""
|
|
106
102
|
return cls(
|
|
107
|
-
sessions=[
|
|
103
|
+
sessions=[SessionModel.from_api_response(session) for session in data["sessions"]],
|
|
108
104
|
total=data["total"],
|
|
109
105
|
has_more=data["has_more"],
|
|
110
106
|
)
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
# Path: recallrai/models/user.py
|
|
2
|
-
# Description: User data models for the RecallrAI SDK
|
|
3
|
-
|
|
4
1
|
"""
|
|
5
2
|
User-related data models for the RecallrAI SDK.
|
|
6
3
|
"""
|
|
7
4
|
|
|
8
5
|
from datetime import datetime
|
|
9
6
|
from typing import Any, Dict
|
|
10
|
-
|
|
11
7
|
from pydantic import BaseModel, Field
|
|
12
8
|
|
|
13
9
|
|
|
14
|
-
class
|
|
10
|
+
class UserModel(BaseModel):
|
|
15
11
|
"""Represents a user in the RecallrAI system."""
|
|
16
12
|
|
|
17
13
|
user_id: str = Field(..., description="Unique identifier for the user")
|
|
@@ -27,15 +23,15 @@ class User(BaseModel):
|
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
@classmethod
|
|
30
|
-
def from_api_response(cls, data: Dict[str, Any]) -> "
|
|
26
|
+
def from_api_response(cls, data: Dict[str, Any]) -> "UserModel":
|
|
31
27
|
"""
|
|
32
|
-
Create a
|
|
28
|
+
Create a UserModel instance from an API response.
|
|
33
29
|
|
|
34
30
|
Args:
|
|
35
31
|
data: API response data
|
|
36
32
|
|
|
37
33
|
Returns:
|
|
38
|
-
A
|
|
34
|
+
A UserModel instance
|
|
39
35
|
"""
|
|
40
36
|
if "user" in data:
|
|
41
37
|
user_data = data["user"]
|
|
@@ -53,7 +49,7 @@ class User(BaseModel):
|
|
|
53
49
|
class UserList(BaseModel):
|
|
54
50
|
"""Represents a paginated list of users."""
|
|
55
51
|
|
|
56
|
-
users: list[
|
|
52
|
+
users: list[UserModel] = Field(..., description="List of users")
|
|
57
53
|
total: int = Field(..., description="Total number of users")
|
|
58
54
|
has_more: bool = Field(..., description="Whether there are more users to fetch")
|
|
59
55
|
|
|
@@ -69,7 +65,7 @@ class UserList(BaseModel):
|
|
|
69
65
|
A UserList instance
|
|
70
66
|
"""
|
|
71
67
|
return cls(
|
|
72
|
-
users=[
|
|
68
|
+
users=[UserModel.from_api_response({"user": user}) for user in data["users"]],
|
|
73
69
|
total=data["total"],
|
|
74
70
|
has_more=data["has_more"],
|
|
75
71
|
)
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
# Path: recallrai/session.py
|
|
2
|
-
# Description: Session management class for the RecallrAI SDK
|
|
3
|
-
|
|
4
1
|
"""
|
|
5
2
|
Session management functionality for the RecallrAI SDK.
|
|
6
3
|
"""
|
|
@@ -164,9 +161,9 @@ class Session:
|
|
|
164
161
|
)
|
|
165
162
|
status = self.get_status()
|
|
166
163
|
if status == SessionStatus.PROCESSED:
|
|
167
|
-
logger.warning("
|
|
164
|
+
logger.warning("You are trying to get context for a processed session. Why do you need it?")
|
|
168
165
|
elif status == SessionStatus.PROCESSING:
|
|
169
|
-
logger.warning("
|
|
166
|
+
logger.warning("You are trying to get context for a processing session. Why do you need it?")
|
|
170
167
|
return Context.from_api_response(response.json())
|
|
171
168
|
|
|
172
169
|
def process(self) -> None:
|
|
@@ -4,7 +4,7 @@ User management functionality for the RecallrAI SDK.
|
|
|
4
4
|
|
|
5
5
|
from typing import Any, Dict, Optional
|
|
6
6
|
from .utils import HTTPClient
|
|
7
|
-
from .models import
|
|
7
|
+
from .models import UserModel, SessionList
|
|
8
8
|
from .session import Session
|
|
9
9
|
from .exceptions import (
|
|
10
10
|
UserNotFoundError,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"""
|
|
2
|
+
HTTP client for making requests to the RecallrAI API.
|
|
3
|
+
"""
|
|
4
4
|
from httpx import Response, Client, TimeoutException, NetworkError, ConnectError
|
|
5
5
|
from typing import Any, Dict, Optional
|
|
6
6
|
from ..exceptions import (
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Path: recallrai/models/__init__.py
|
|
2
|
-
# Description: Package initialization for data models
|
|
3
|
-
|
|
4
|
-
from .session import Context, Message, MessageRole, Session, SessionList, SessionStatus
|
|
5
|
-
from .user import User, UserList
|
|
6
|
-
|
|
7
|
-
__all__ = [
|
|
8
|
-
"User",
|
|
9
|
-
"UserList",
|
|
10
|
-
"Session",
|
|
11
|
-
"SessionList",
|
|
12
|
-
"SessionStatus",
|
|
13
|
-
"Message",
|
|
14
|
-
"MessageRole",
|
|
15
|
-
"Context",
|
|
16
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|