unique_sdk 0.9.16__tar.gz → 0.9.18__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.
Files changed (36) hide show
  1. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/CHANGELOG.md +6 -0
  2. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/PKG-INFO +7 -1
  3. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/pyproject.toml +1 -1
  4. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_api_resource.py +0 -1
  5. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_util.py +3 -0
  6. unique_sdk-0.9.18/unique_sdk/_version.py +1 -0
  7. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/_short_term_memory.py +3 -5
  8. unique_sdk-0.9.16/unique_sdk/_version.py +0 -1
  9. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/LICENSE +0 -0
  10. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/README.md +0 -0
  11. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/__init__.py +0 -0
  12. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_api_requestor.py +0 -0
  13. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_api_version.py +0 -0
  14. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_error.py +0 -0
  15. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_http_client.py +0 -0
  16. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_list_object.py +0 -0
  17. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_object_classes.py +0 -0
  18. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_request_options.py +0 -0
  19. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_unique_object.py +0 -0
  20. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_unique_ql.py +0 -0
  21. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_unique_response.py +0 -0
  22. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/_webhook.py +0 -0
  23. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/__init__.py +0 -0
  24. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/_acronyms.py +0 -0
  25. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/_chat_completion.py +0 -0
  26. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/_content.py +0 -0
  27. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/_embedding.py +0 -0
  28. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/_event.py +0 -0
  29. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/_integrated.py +0 -0
  30. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/_message.py +0 -0
  31. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/_search.py +0 -0
  32. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/api_resources/_search_string.py +0 -0
  33. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/utils/chat_history.py +0 -0
  34. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/utils/file_io.py +0 -0
  35. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/utils/sources.py +0 -0
  36. {unique_sdk-0.9.16 → unique_sdk-0.9.18}/unique_sdk/utils/token.py +0 -0
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.9.18] - 2025-01-22
9
+ - Removed `Invalid response body from API` from `retry_dict` as it's our own artificail error.
10
+
11
+ ## [0.9.17] - 2025-01-03
12
+ - BREAKING CHANGE!! Removed unused `id` from `ShortTermMemory` create and find methods.
13
+
8
14
  ## [0.9.16] - 2024-12-19
9
15
  - Corrected return type of `Search.create` and `Search.create_async` to `List[Search]`
10
16
  - Retry on `Connection aborted` error
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_sdk
3
- Version: 0.9.16
3
+ Version: 0.9.18
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Martin Fadler
@@ -899,6 +899,12 @@ All notable changes to this project will be documented in this file.
899
899
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
900
900
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
901
901
 
902
+ ## [0.9.18] - 2025-01-22
903
+ - Removed `Invalid response body from API` from `retry_dict` as it's our own artificail error.
904
+
905
+ ## [0.9.17] - 2025-01-03
906
+ - BREAKING CHANGE!! Removed unused `id` from `ShortTermMemory` create and find methods.
907
+
902
908
  ## [0.9.16] - 2024-12-19
903
909
  - Corrected return type of `Search.create` and `Search.create_async` to `List[Search]`
904
910
  - Retry on `Connection aborted` error
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "unique_sdk"
3
- version = "0.9.16"
3
+ version = "0.9.18"
4
4
  description = ""
5
5
  authors = [
6
6
  "Martin Fadler <martin.fadler@unique.ch>",
@@ -22,7 +22,6 @@ retry_dict = {
22
22
  "error_messages": [
23
23
  "problem proxying the request",
24
24
  "Upstream service reached a hard timeout",
25
- "Invalid response body from API",
26
25
  "You can retry your request",
27
26
  "Internal server error",
28
27
  "Connection aborted",
@@ -210,6 +210,7 @@ def retry_on_error(
210
210
  try:
211
211
  return await func(*args, **kwargs)
212
212
  except Exception as e:
213
+ logger.error(f"Retrying because of {e}")
213
214
  should_retry = any(
214
215
  err_msg.lower() in str(e).lower() for err_msg in error_messages
215
216
  )
@@ -235,6 +236,8 @@ def retry_on_error(
235
236
  try:
236
237
  return func(*args, **kwargs)
237
238
  except Exception as e:
239
+ logger.error(f"Retrying because of {e}")
240
+
238
241
  should_retry = any(
239
242
  err_msg.lower() in str(e).lower() for err_msg in error_messages
240
243
  )
@@ -0,0 +1 @@
1
+ VERSION = "0.9.18"
@@ -1,6 +1,6 @@
1
1
  from typing import ClassVar, Literal, Optional, cast
2
2
 
3
- from typing_extensions import Unpack
3
+ from typing_extensions import NotRequired, Unpack
4
4
 
5
5
  from unique_sdk._api_resource import APIResource
6
6
  from unique_sdk._request_options import RequestOptions
@@ -12,13 +12,13 @@ class ShortTermMemory(APIResource["ShortTermMemory"]):
12
12
  class CreateParams(RequestOptions):
13
13
  memoryName: str
14
14
  chatId: Optional[str]
15
- messageId: Optional[str]
15
+ messageId: NotRequired[Optional[str]]
16
16
  data: Optional[str]
17
17
 
18
18
  class FindParams(RequestOptions):
19
19
  memoryName: str
20
20
  chatId: Optional[str]
21
- messageId: Optional[str]
21
+ messageId: NotRequired[Optional[str]]
22
22
 
23
23
  id: str
24
24
  memoryName: str
@@ -73,7 +73,6 @@ class ShortTermMemory(APIResource["ShortTermMemory"]):
73
73
  cls,
74
74
  user_id: str,
75
75
  company_id: str,
76
- id: str,
77
76
  **params: Unpack["ShortTermMemory.FindParams"],
78
77
  ) -> "ShortTermMemory":
79
78
  """
@@ -95,7 +94,6 @@ class ShortTermMemory(APIResource["ShortTermMemory"]):
95
94
  cls,
96
95
  user_id: str,
97
96
  company_id: str,
98
- id: str,
99
97
  **params: Unpack["ShortTermMemory.FindParams"],
100
98
  ) -> "ShortTermMemory":
101
99
  """
@@ -1 +0,0 @@
1
- VERSION = "0.9.15"
File without changes
File without changes