|
18 | 18 | from .errors import parse_error |
19 | 19 | from .retry import DEFAULT_RETRY_CONFIG, RetryConfig, with_retry_sync |
20 | 20 |
|
21 | | - |
22 | 21 | # --- Composio Types --- |
23 | 22 |
|
24 | 23 | @dataclass |
@@ -224,7 +223,7 @@ def _do_remember() -> str: |
224 | 223 | ) |
225 | 224 | if resp.status_code != 200: |
226 | 225 | raise parse_error(resp) |
227 | | - return resp.json().get("id", "") |
| 226 | + return str(resp.json().get("id", "")) |
228 | 227 |
|
229 | 228 | return with_retry_sync(_do_remember, retry_config) |
230 | 229 |
|
@@ -259,7 +258,7 @@ def _do_remember() -> str: |
259 | 258 | }) |
260 | 259 | if resp.status_code != 200: |
261 | 260 | raise parse_error(resp) |
262 | | - return resp.json().get("id", "") |
| 261 | + return str(resp.json().get("id", "")) |
263 | 262 |
|
264 | 263 | return with_retry_sync(_do_remember, retry_config) |
265 | 264 |
|
@@ -290,7 +289,7 @@ def _do_remember() -> str: |
290 | 289 | }) |
291 | 290 | if resp.status_code != 200: |
292 | 291 | raise parse_error(resp) |
293 | | - return resp.json().get("id", "") |
| 292 | + return str(resp.json().get("id", "")) |
294 | 293 |
|
295 | 294 | return with_retry_sync(_do_remember, retry_config) |
296 | 295 |
|
@@ -325,7 +324,7 @@ def _do_remember() -> str: |
325 | 324 | }) |
326 | 325 | if resp.status_code != 200: |
327 | 326 | raise parse_error(resp) |
328 | | - return resp.json().get("id", "") |
| 327 | + return str(resp.json().get("id", "")) |
329 | 328 |
|
330 | 329 | return with_retry_sync(_do_remember, retry_config) |
331 | 330 |
|
@@ -386,7 +385,7 @@ def _do_sync() -> int: |
386 | 385 | ) |
387 | 386 | if resp.status_code != 200: |
388 | 387 | raise parse_error(resp) |
389 | | - return resp.json().get("promoted", 0) |
| 388 | + return int(resp.json().get("promoted", 0)) |
390 | 389 |
|
391 | 390 | return with_retry_sync(_do_sync, retry_config) |
392 | 391 |
|
@@ -416,6 +415,6 @@ def _do_recall() -> str: |
416 | 415 | }) |
417 | 416 | if resp.status_code != 200: |
418 | 417 | raise parse_error(resp) |
419 | | - return resp.json().get("context", "") |
| 418 | + return str(resp.json().get("context", "")) |
420 | 419 |
|
421 | 420 | return with_retry_sync(_do_recall, retry_config) |
0 commit comments