recallrai 0.1.0__py3-none-any.whl → 0.2.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.

Potentially problematic release.


This version of recallrai might be problematic. Click here for more details.

@@ -0,0 +1,123 @@
1
+ """
2
+ HTTP client for making requests to the RecallrAI API.
3
+ """
4
+ from httpx import Response, Client, TimeoutException, NetworkError, ConnectError
5
+ from typing import Any, Dict, Optional
6
+ from ..exceptions import (
7
+ TimeoutError,
8
+ NetworkError as CustomNetworkError,
9
+ ConnectionError,
10
+ ValidationError,
11
+ InternalServerError,
12
+ AuthenticationError,
13
+ )
14
+
15
+ class HTTPClient:
16
+ """HTTP client for making requests to the RecallrAI API."""
17
+
18
+ def __init__(
19
+ self,
20
+ api_key: str,
21
+ project_id: str,
22
+ base_url: str,
23
+ timeout: int = 30,
24
+ ):
25
+ """
26
+ Initialize the HTTP client.
27
+
28
+ Args:
29
+ api_key: Your RecallrAI API key
30
+ project_id: Your project ID
31
+ base_url: The base URL for the RecallrAI API
32
+ timeout: Request timeout in seconds
33
+ """
34
+ self.api_key = api_key
35
+ self.project_id = project_id
36
+ self.base_url = base_url.rstrip("/")
37
+ self.timeout = timeout
38
+ self.client = Client(
39
+ timeout=self.timeout,
40
+ headers={
41
+ "X-Api-Key": self.api_key,
42
+ "X-Project-Id": self.project_id,
43
+ "Content-Type": "application/json",
44
+ "Accept": "application/json",
45
+ "User-Agent": "RecallrAI-Python-SDK",
46
+ # TODO: "SDK-Version": "0.1.0",
47
+ },
48
+ )
49
+
50
+ def request(
51
+ self,
52
+ method: str,
53
+ path: str,
54
+ params: Optional[Dict[str, Any]] = None,
55
+ data: Optional[Dict[str, Any]] = None,
56
+ ) -> Response:
57
+ """
58
+ Make a request to the RecallrAI API.
59
+
60
+ Args:
61
+ method: HTTP method (GET, POST, PUT, DELETE)
62
+ path: API endpoint path
63
+ params: Query parameters
64
+ data: Request body data
65
+
66
+ Returns:
67
+ The parsed JSON response
68
+ """
69
+ url = f"{self.base_url}{path}"
70
+
71
+ # Filter out None values in params and data
72
+ if params:
73
+ params = {k: v for k, v in params.items() if v is not None}
74
+
75
+ if data:
76
+ data = {k: v for k, v in data.items() if v is not None}
77
+
78
+ try:
79
+ response = self.client.request(
80
+ method=method,
81
+ url=url,
82
+ params=params,
83
+ json=data,
84
+ )
85
+ if response.status_code == 422:
86
+ raise ValidationError(
87
+ details=response.json()["detail"],
88
+ )
89
+ elif response.status_code == 500:
90
+ raise InternalServerError(
91
+ details=response.json()["detail"],
92
+ )
93
+ elif response.status_code == 401:
94
+ raise AuthenticationError(
95
+ details=response.json()["detail"],
96
+ )
97
+
98
+ return response
99
+ except TimeoutException as e:
100
+ raise TimeoutError(f"Request timed out: {e}")
101
+ except NetworkError as e:
102
+ raise CustomNetworkError(f"Network error occurred: {e}")
103
+ except ConnectError as e:
104
+ raise ConnectionError(f"Failed to connect to the API: {e}")
105
+ except Exception as e:
106
+ # Handle other exceptions as needed
107
+ raise e
108
+
109
+ def get(self, path: str, params: Optional[Dict[str, Any]] = None) -> Response:
110
+ """Make a GET request."""
111
+ return self.request("GET", path, params=params)
112
+
113
+ def post(self, path: str, data: Optional[Dict[str, Any]] = None) -> Response:
114
+ """Make a POST request."""
115
+ return self.request("POST", path, data=data)
116
+
117
+ def put(self, path: str, data: Optional[Dict[str, Any]] = None) -> Response:
118
+ """Make a PUT request."""
119
+ return self.request("PUT", path, data=data)
120
+
121
+ def delete(self, path: str) -> Response:
122
+ """Make a DELETE request."""
123
+ return self.request("DELETE", path)
@@ -0,0 +1,439 @@
1
+ Metadata-Version: 2.3
2
+ Name: recallrai
3
+ Version: 0.2.0
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
+ License: MIT
6
+ Keywords: ai,memory,context,llm,mem0,getzep,zep
7
+ Author: Devasheesh Mishra
8
+ Author-email: devasheeshmishra4@gmail.com
9
+ Requires-Python: >=3.9,<3.14
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Requires-Dist: httpx (>=0.28.1,<0.29.0)
20
+ Requires-Dist: pydantic (>=2.11.1,<3.0.0)
21
+ Project-URL: Homepage, https://recallrai.com
22
+ Project-URL: Repository, https://github.com/recallrai/sdk-python
23
+ Description-Content-Type: text/markdown
24
+
25
+ # RecallrAI Python SDK
26
+
27
+ Official Python SDK for RecallrAI – a revolutionary contextual memory system that enables AI assistants to form meaningful connections between conversations, just like human memory.
28
+
29
+ ## Installation
30
+
31
+ Install the SDK via Poetry or pip:
32
+
33
+ ```bash
34
+ poetry add recallrai
35
+ # or
36
+ pip install recallrai
37
+ ```
38
+
39
+ ## Initialization
40
+
41
+ Create a client instance with your API key and project ID:
42
+
43
+ ```python
44
+ from recallrai import RecallrAI
45
+
46
+ api_key = "rai_yourapikey"
47
+ project_id = "project-uuid"
48
+ client = RecallrAI(api_key=api_key, project_id=project_id)
49
+ ```
50
+
51
+ ## User Management
52
+
53
+ ### Create a User
54
+
55
+ ```python
56
+ from recallrai.exceptions import UserAlreadyExistsError
57
+ try:
58
+ user = client.create_user(user_id="user123", metadata={"name": "John Doe"})
59
+ print(f"Created user: {user.user_id}")
60
+ print(f"User metadata: {user.metadata}")
61
+ print(f"Created at: {user.created_at}")
62
+ except UserAlreadyExistsError as e:
63
+ print(f"Error: {e}")
64
+ ```
65
+
66
+ ### Get a User
67
+
68
+ ```python
69
+ from recallrai.exceptions import UserNotFoundError
70
+ try:
71
+ user = client.get_user("user123")
72
+ print(f"User metadata: {user.metadata}")
73
+ print(f"Last active: {user.last_active_at}")
74
+ except UserNotFoundError as e:
75
+ print(f"Error: {e}")
76
+ ```
77
+
78
+ ### List Users
79
+
80
+ ```python
81
+ user_list = client.list_users(offset=0, limit=10)
82
+ print(f"Total users: {user_list.total}")
83
+ print(f"Has more users: {user_list.has_more}")
84
+
85
+ for user in user_list.users:
86
+ print(f"User ID: {user.user_id}")
87
+ print(f"Metadata: {user.metadata}")
88
+ print(f"Created at: {user.created_at}")
89
+ print(f"Last active: {user.last_active_at}")
90
+ print("---")
91
+ ```
92
+
93
+ ### Update a User
94
+
95
+ ```python
96
+ from recallrai.exceptions import UserNotFoundError, UserAlreadyExistsError
97
+ try:
98
+ user = client.get_user("user123")
99
+ updated_user = user.update(
100
+ new_metadata={"name": "John Doe", "role": "admin"},
101
+ new_user_id="john_doe"
102
+ )
103
+ print(f"Updated user ID: {updated_user.user_id}")
104
+ print(f"Updated metadata: {updated_user.metadata}")
105
+ except UserNotFoundError as e:
106
+ print(f"Error: {e}")
107
+ except UserAlreadyExistsError as e:
108
+ print(f"Error: {e}")
109
+ ```
110
+
111
+ ### Delete a User
112
+
113
+ ```python
114
+ from recallrai.exceptions import UserNotFoundError
115
+ try:
116
+ user = client.get_user("john_doe")
117
+ user.delete()
118
+ print("User deleted successfully")
119
+ except UserNotFoundError as e:
120
+ print(f"Error: {e}")
121
+ ```
122
+
123
+ ## Session Management
124
+
125
+ ### Create a Session
126
+
127
+ ```python
128
+ from recallrai.exceptions import UserNotFoundError
129
+ from recallrai.session import Session
130
+
131
+ try:
132
+ # First, get the user
133
+ user = client.get_user("user123")
134
+
135
+ # Create a session for the user; auto_process_after_minutes set to -1 disables auto-processing
136
+ session: Session = user.create_session(auto_process_after_minutes=5)
137
+ print("Created session id:", session.session_id)
138
+ except UserNotFoundError as e:
139
+ print(f"Error: {e}")
140
+ ```
141
+
142
+ ### Get an Existing Session
143
+
144
+ ```python
145
+ from recallrai.exceptions import UserNotFoundError, SessionNotFoundError
146
+
147
+ try:
148
+ # First, get the user
149
+ user = client.get_user("user123")
150
+
151
+ # Retrieve an existing session by its ID
152
+ session = user.get_session(session_id="session-uuid")
153
+ print("Session status:", session.get_status())
154
+ except UserNotFoundError as e:
155
+ print(f"Error: {e}")
156
+ except SessionNotFoundError as e:
157
+ print(f"Error: {e}")
158
+ ```
159
+
160
+ ### List Sessions
161
+
162
+ ```python
163
+ from recallrai.exceptions import UserNotFoundError
164
+
165
+ try:
166
+ # First, get the user
167
+ user = client.get_user("user123")
168
+
169
+ # List sessions for this user
170
+ session_list = user.list_sessions(offset=0, limit=10)
171
+ for session in session_list.sessions:
172
+ print(session.session_id, session.status)
173
+ except UserNotFoundError as e:
174
+ print(f"Error: {e}")
175
+ ```
176
+
177
+ ### Session – Adding Messages
178
+
179
+ ```python
180
+ from recallrai.exceptions import UserNotFoundError, SessionNotFoundError, InvalidSessionStateError
181
+
182
+ try:
183
+ # Add a user message
184
+ session.add_user_message("Hello! How are you?")
185
+
186
+ # Add an assistant message
187
+ session.add_assistant_message("I'm an assistant. How can I help you?")
188
+ except UserNotFoundError as e:
189
+ print(f"Error: {e}")
190
+ except SessionNotFoundError as e:
191
+ print(f"Error: {e}")
192
+ except InvalidSessionStateError as e:
193
+ print(f"Error: {e}")
194
+ ```
195
+
196
+ ### Session – Retrieving Context
197
+
198
+ ```python
199
+ from recallrai.exceptions import UserNotFoundError, SessionNotFoundError
200
+
201
+ try:
202
+ context = session.get_context()
203
+ print("Memory used:", context.memory_used)
204
+ print("Context:", context.context)
205
+ except UserNotFoundError as e:
206
+ print(f"Error: {e}")
207
+ except SessionNotFoundError as e:
208
+ print(f"Error: {e}")
209
+ ```
210
+
211
+ ### Session – Process Session
212
+
213
+ ```python
214
+ from recallrai.exceptions import UserNotFoundError, SessionNotFoundError, InvalidSessionStateError
215
+
216
+ try:
217
+ session.process()
218
+ except UserNotFoundError as e:
219
+ print(f"Error: {e}")
220
+ except SessionNotFoundError as e:
221
+ print(f"Error: {e}")
222
+ except InvalidSessionStateError as e:
223
+ print(f"Error: {e}")
224
+ ```
225
+
226
+ ### Session – Get Status and Messages
227
+
228
+ ```python
229
+ from recallrai.exceptions import UserNotFoundError, SessionNotFoundError
230
+ from recallrai.models import SessionStatus
231
+
232
+ try:
233
+ status = session.get_status()
234
+ print("Session status:", status)
235
+
236
+ # Check if the session is in a specific state
237
+ if status == SessionStatus.PROCESSED:
238
+ print("Session has been processed")
239
+
240
+ messages = session.get_messages()
241
+ for message in messages:
242
+ print(f"{message.role}: {message.content} at {message.timestamp}")
243
+ except UserNotFoundError as e:
244
+ print(f"Error: {e}")
245
+ except SessionNotFoundError as e:
246
+ print(f"Error: {e}")
247
+ ```
248
+
249
+ ## Example Usage with LLMs
250
+
251
+ ```python
252
+ import openai
253
+ from recallrai import RecallrAI
254
+ from recallrai.exceptions import UserNotFoundError
255
+
256
+ # Initialize RecallrAI and OpenAI clients
257
+ rai_client = RecallrAI(
258
+ api_key="rai_yourapikey",
259
+ project_id="your-project-uuid"
260
+ )
261
+ oai_client = openai.OpenAI(api_key="your-openai-api-key")
262
+
263
+ def chat_with_memory(user_id, session_id=None):
264
+ # Get or create user
265
+ try:
266
+ user = rai_client.get_user(user_id)
267
+ except UserNotFoundError:
268
+ user = rai_client.create_user(user_id)
269
+
270
+ # Create a new session or get an existing one
271
+ if session_id:
272
+ session = user.get_session(session_id=session_id)
273
+ else:
274
+ session = user.create_session(auto_process_after_minutes=30)
275
+ print(f"Created new session: {session.session_id}")
276
+
277
+ print("Chat session started. Type 'exit' to end the conversation.")
278
+
279
+ while True:
280
+ # Get user input
281
+ user_message = input("You: ")
282
+ if user_message.lower() == 'exit':
283
+ break
284
+
285
+ # Add the user message to RecallrAI
286
+ session.add_user_message(user_message)
287
+
288
+ # Get context from RecallrAI after adding the user message
289
+ context = session.get_context()
290
+
291
+ # Create a system prompt that includes the context
292
+ system_prompt = f"""You are a helpful assistant with memory of previous conversations.
293
+
294
+ MEMORIES ABOUT THE USER:
295
+ {context.context}
296
+
297
+ You can use the above memories to provide better responses to the user.
298
+ Don't mention that you have access to memories unless you are explicitly asked."""
299
+
300
+ # Get previous messages
301
+ previous_messages = session.get_messages()
302
+ previous_messages = [{"role": message.role, "content": message.content} for message in previous_messages]
303
+
304
+ # Call the LLM with the system prompt and conversation history
305
+ response = oai_client.chat.completions.create(
306
+ model="gpt-4o-mini",
307
+ messages=[
308
+ {"role": "system", "content": system_prompt},
309
+ **previous_messages,
310
+ ],
311
+ temperature=0.7
312
+ )
313
+
314
+ assistant_message = response.choices[0].message.content
315
+
316
+ # Print the assistant's response
317
+ print(f"Assistant: {assistant_message}")
318
+
319
+ # Add the assistant's response to RecallrAI
320
+ session.add_assistant_message(assistant_message)
321
+
322
+ # Process the session at the end of the conversation
323
+ print("Processing session to update memory...")
324
+ session.process()
325
+ print(f"Session ended. Session ID: {session.session_id}")
326
+ return session.session_id
327
+
328
+ # Example usage
329
+ if __name__ == "__main__":
330
+ user_id = "user123"
331
+ # To continue a previous session, uncomment below and provide the session ID
332
+ # previous_session_id = "previously-saved-session-uuid"
333
+ # session_id = chat_with_memory(user_id, previous_session_id)
334
+
335
+ # Start a new session
336
+ session_id = chat_with_memory(user_id)
337
+ print(f"To continue this conversation later, use session ID: {session_id}")
338
+ ```
339
+
340
+ ## Exception Handling
341
+
342
+ The RecallrAI SDK implements a comprehensive exception hierarchy to help you handle different error scenarios gracefully:
343
+
344
+ ### Base Exception
345
+
346
+ - **RecallrAIError**: The base exception for all SDK-specific errors. All other exceptions inherit from this.
347
+
348
+ ### Authentication Errors
349
+
350
+ - **AuthenticationError**: Raised when there's an issue with your API key or project ID authentication.
351
+
352
+ ### Network-Related Errors
353
+
354
+ - **NetworkError**: Base exception for all network-related issues.
355
+ - **TimeoutError**: Occurs when a request takes too long to complete.
356
+ - **ConnectionError**: Happens when the SDK cannot establish a connection to the RecallrAI API.
357
+
358
+ ### Server Errors
359
+
360
+ - **ServerError**: Base class for server-side errors.
361
+ - **InternalServerError**: Raised when the RecallrAI API returns a 5xx error code.
362
+
363
+ ### User-Related Errors
364
+
365
+ - **UserError**: Base for all user-related exceptions.
366
+ - **UserNotFoundError**: Raised when attempting to access a user that doesn't exist.
367
+ - **UserAlreadyExistsError**: Occurs when creating a user with an ID that already exists.
368
+
369
+ ### Session-Related Errors
370
+
371
+ - **SessionError**: Base for all session-related exceptions.
372
+ - **SessionNotFoundError**: Raised when attempting to access a non-existent session.
373
+ - **InvalidSessionStateError**: Occurs when performing an operation that's not valid for the current session state (e.g., adding a message to a processed session).
374
+
375
+ ### Input Validation Errors
376
+
377
+ - **ValidationError**: Raised when provided data doesn't meet the required format or constraints.
378
+
379
+ ### Importing Exceptions
380
+
381
+ You can import exceptions directly from the `recallrai.exceptions` module:
382
+
383
+ ```python
384
+ # Import specific exceptions
385
+ from recallrai.exceptions import UserNotFoundError, SessionNotFoundError
386
+
387
+ # Import all exceptions
388
+ from recallrai.exceptions import (
389
+ RecallrAIError,
390
+ AuthenticationError,
391
+ NetworkError,
392
+ TimeoutError,
393
+ ConnectionError,
394
+ ServerError,
395
+ InternalServerError,
396
+ SessionError,
397
+ SessionNotFoundError,
398
+ InvalidSessionStateError,
399
+ UserError,
400
+ UserNotFoundError,
401
+ UserAlreadyExistsError,
402
+ ValidationError,
403
+ )
404
+ ```
405
+
406
+ ### Best Practices for Error Handling
407
+
408
+ When implementing error handling with the RecallrAI SDK, consider these best practices:
409
+
410
+ 1. **Handle specific exceptions first**: Catch more specific exceptions before general ones.
411
+
412
+ ```python
413
+ try:
414
+ # SDK operation
415
+ except UserNotFoundError:
416
+ # Specific handling
417
+ except RecallrAIError:
418
+ # General fallback
419
+ ```
420
+
421
+ 2. **Implement retry logic for transient errors**: Network and timeout errors might be temporary.
422
+
423
+ 3. **Log detailed error information**: Exceptions contain useful information for debugging.
424
+
425
+ 4. **Handle common user flows**: For example, check if a user exists before operations, or create them if they don't:
426
+
427
+ ```python
428
+ try:
429
+ user = client.get_user(user_id)
430
+ except UserNotFoundError:
431
+ user = client.create_user(user_id)
432
+ ```
433
+
434
+ For more detailed information on specific exceptions, refer to the API documentation.
435
+
436
+ ## Conclusion
437
+
438
+ This README outlines the basic usage of the RecallrAI SDK functions for user and session management. For additional documentation and advanced usage, please see the [official documentation](https://recallrai.com) or the source code repository on [GitHub](https://github.com/recallrai/sdk-python).
439
+
@@ -0,0 +1,20 @@
1
+ recallrai/__init__.py,sha256=kv6EEDKXguLde8pXjnAdeDFA67v7PDRKelhdCCnwOsQ,272
2
+ recallrai/client.py,sha256=eNK2cXZDlWPYqAObE9Hc83h0m9FA8Eeh5NAjy1TRAv0,4575
3
+ recallrai/exceptions/__init__.py,sha256=uE-7ywJ1dIJPdUTJisVRXwMzgv6AMgTEpRfDe_d9-1c,782
4
+ recallrai/exceptions/auth.py,sha256=dLabhdTmCBtpp0Ghv3iIw6f3xQn2XXjKCFm1WsiIqXc,700
5
+ recallrai/exceptions/base.py,sha256=89wTP9Yt3S7Mej2pzKkAZKM0OFXho4t2KouEaiJ69Wg,1016
6
+ recallrai/exceptions/network.py,sha256=QriByZFgXPEeYfpl_ozxTtzNwHfHtUlPSVb2pAymCx0,1562
7
+ recallrai/exceptions/server.py,sha256=jLINK_3CoOwqKyzKtGB5DwxyZj5S8U2z6zYCZePWqbk,2416
8
+ recallrai/exceptions/sessions.py,sha256=EwcdzxpDxDjUZVu-etgnayWFq2ADmybKfEQuweLw1VE,1777
9
+ recallrai/exceptions/users.py,sha256=kpIhgt92cmW9AOazkD4hgvF8PPq2aYRridtO5pyto8M,1835
10
+ recallrai/exceptions/validation.py,sha256=H0Nnv_RDeah3KzLhB13Ozu0q2cFMJIO-kfl3PWnCpyc,625
11
+ recallrai/models/__init__.py,sha256=g4alYb0tTelVYF-MWCUhgDH1Ea2uK88SCnel4maDlR0,321
12
+ recallrai/models/session.py,sha256=8lf5JxC4RtiO8vPVP17DA5_IDEsGgeZyx9bdoWF9PtE,3601
13
+ recallrai/models/user.py,sha256=E1NSDsG7suW8fTTm5tu4dnWY45vasPauhu0DRMaFRf8,2131
14
+ recallrai/session.py,sha256=aIgVrwmI7OUEnx3iqzVkYxLQ17tgQ9m1-K2UC4d9I5E,10982
15
+ recallrai/user.py,sha256=coK42Rj6fUgzrj0AjOnZyNxxLRH_vEiFFvwRvhpLLqI,7706
16
+ recallrai/utils/__init__.py,sha256=6DovotQG1UrscXSIHMkAJcFXmpf4D-4Iwl1RbeKKY84,107
17
+ recallrai/utils/http_client.py,sha256=sLpKEcvfWoq7Ny-U_bptfqxqQbZGCL_1cwbDmvKXUwk,3930
18
+ recallrai-0.2.0.dist-info/METADATA,sha256=HwQu0i-lX5PhwEKpAdcnWoMp6Bri_sBPHVD1Qov1v8U,13217
19
+ recallrai-0.2.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
20
+ recallrai-0.2.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,61 +0,0 @@
1
- # Path: recallrai/exceptions.py
2
- # Description: Custom exceptions for the RecallrAI SDK
3
-
4
- """
5
- Custom exceptions for the RecallrAI SDK.
6
- """
7
-
8
- from typing import Any, Dict, Optional
9
-
10
-
11
- class RecallrAIError(Exception):
12
- """Base exception for all RecallrAI SDK errors."""
13
-
14
- def __init__(self, message: str, code: Optional[str] = None, details: Optional[Dict[str, Any]] = None):
15
- """
16
- Initialize a RecallrAI error.
17
-
18
- Args:
19
- message: A human-readable error message
20
- code: An optional error code
21
- details: Optional additional details about the error
22
- """
23
- self.message = message
24
- self.code = code
25
- self.details = details or {}
26
- super().__init__(self.message)
27
-
28
-
29
- class AuthenticationError(RecallrAIError):
30
- """Raised when there is an authentication issue with the API key or project ID."""
31
- pass
32
-
33
-
34
- class NotFoundError(RecallrAIError):
35
- """Raised when a requested resource is not found."""
36
- pass
37
-
38
-
39
- class ValidationError(RecallrAIError):
40
- """Raised when the API rejects a request due to validation errors."""
41
- pass
42
-
43
-
44
- class RateLimitError(RecallrAIError):
45
- """Raised when the API rate limit has been exceeded."""
46
- pass
47
-
48
-
49
- class ServerError(RecallrAIError):
50
- """Raised when the API encounters an unexpected server error."""
51
- pass
52
-
53
-
54
- class BadRequestError(RecallrAIError):
55
- """Raised when the API rejects a request due to invalid parameters."""
56
- pass
57
-
58
-
59
- class SessionProcessingError(RecallrAIError):
60
- """Raised when there is an error processing a session."""
61
- pass