unique_sdk 0.10.9__py3-none-any.whl → 0.10.11__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.
unique_sdk/_error.py CHANGED
@@ -51,17 +51,13 @@ class UniqueError(Exception):
51
51
 
52
52
  class UniqueErrorWithParamsCode(UniqueError):
53
53
  def __repr__(self):
54
- return (
55
- "%s(message=%r, params=%r, code=%r, http_status=%r, "
56
- "request_id=%r)"
57
- % (
58
- self.__class__.__name__,
59
- self._message,
60
- self.params, # type: ignore
61
- self.code,
62
- self.http_status,
63
- self.request_id,
64
- )
54
+ return "%s(message=%r, params=%r, code=%r, http_status=%r, request_id=%r)" % (
55
+ self.__class__.__name__,
56
+ self._message,
57
+ self.params, # type: ignore
58
+ self.code,
59
+ self.http_status,
60
+ self.request_id,
65
61
  )
66
62
 
67
63
 
@@ -19,6 +19,7 @@ from unique_sdk._request_options import RequestOptions
19
19
 
20
20
  class CallToolTextResourceDto(TypedDict):
21
21
  """Text resource containing URI, optional MIME type, and text content."""
22
+
22
23
  uri: str
23
24
  mimeType: Optional[str]
24
25
  text: str
@@ -26,6 +27,7 @@ class CallToolTextResourceDto(TypedDict):
26
27
 
27
28
  class CallToolBlobResourceDto(TypedDict):
28
29
  """Blob resource containing URI, optional MIME type, and base64-encoded content."""
30
+
29
31
  uri: str
30
32
  mimeType: Optional[str]
31
33
  blob: str
@@ -33,16 +35,21 @@ class CallToolBlobResourceDto(TypedDict):
33
35
 
34
36
  class CallToolContentDto(TypedDict):
35
37
  """Content returned by an MCP tool call."""
38
+
36
39
  type: Literal["text", "image", "audio", "resource_link", "resource"]
37
-
40
+
38
41
  # Optional fields for different content types
39
42
  text: NotRequired[Optional[str]] # For type: "text"
40
43
  data: NotRequired[Optional[str]] # Base64 data for type: "image" or "audio"
41
- mimeType: NotRequired[Optional[str]] # For type: "image", "audio", or "resource_link"
44
+ mimeType: NotRequired[
45
+ Optional[str]
46
+ ] # For type: "image", "audio", or "resource_link"
42
47
  uri: NotRequired[Optional[str]] # For type: "resource_link"
43
48
  name: NotRequired[Optional[str]] # For type: "resource_link"
44
49
  description: NotRequired[Optional[str]] # For type: "resource_link"
45
- resource: NotRequired[Optional[Union[CallToolTextResourceDto, CallToolBlobResourceDto]]] # For type: "resource"
50
+ resource: NotRequired[
51
+ Optional[Union[CallToolTextResourceDto, CallToolBlobResourceDto]]
52
+ ] # For type: "resource"
46
53
 
47
54
 
48
55
  class MCP(APIResource["MCP"]):
@@ -50,6 +57,7 @@ class MCP(APIResource["MCP"]):
50
57
 
51
58
  class CallToolParams(RequestOptions):
52
59
  """Parameters for calling an MCP tool."""
60
+
53
61
  name: str
54
62
  arguments: Dict[str, Any]
55
63
 
@@ -68,12 +76,12 @@ class MCP(APIResource["MCP"]):
68
76
  ) -> "MCP":
69
77
  """
70
78
  Call an MCP tool with the specified name and arguments.
71
-
79
+
72
80
  Args:
73
81
  user_id: The ID of the user making the request
74
82
  company_id: The ID of the company
75
83
  **params: Tool parameters including name and arguments
76
-
84
+
77
85
  Returns:
78
86
  MCP: The response from the MCP tool call
79
87
  """
@@ -97,12 +105,12 @@ class MCP(APIResource["MCP"]):
97
105
  ) -> "MCP":
98
106
  """
99
107
  Asynchronously call an MCP tool with the specified name and arguments.
100
-
108
+
101
109
  Args:
102
110
  user_id: The ID of the user making the request
103
111
  company_id: The ID of the company
104
112
  **params: Tool parameters including name and arguments
105
-
113
+
106
114
  Returns:
107
115
  MCP: The response from the MCP tool call
108
116
  """
@@ -115,4 +123,4 @@ class MCP(APIResource["MCP"]):
115
123
  company_id,
116
124
  params=params,
117
125
  ),
118
- )
126
+ )
@@ -56,16 +56,16 @@ class Space(APIResource["Space"]):
56
56
 
57
57
  id: str
58
58
  chatId: str
59
- text: str | None = None
60
- originalText: str | None = None
59
+ text: str | None
60
+ originalText: str | None
61
61
  role: Literal["system", "user", "assistant"]
62
- debugInfo: Optional[Dict[str, Any]] = None
62
+ debugInfo: Optional[Dict[str, Any]]
63
63
  completedAt: str | None
64
64
  createdAt: str | None
65
65
  updatedAt: str | None
66
66
  stoppedStreamingAt: str | None
67
- assessment: Optional[List["Space.Reference"]]
68
- messageAssessment: Optional[List["Space.Assessment"]]
67
+ references: Optional[List["Space.Reference"]]
68
+ assessment: Optional[List["Space.Assessment"]]
69
69
 
70
70
  class DeleteChatResponse(TypedDict):
71
71
  """
@@ -24,7 +24,7 @@ def sort_sources(searchContext) -> list[str]:
24
24
  sources.sort(key=lambda x: x.order)
25
25
  for i, s in enumerate(sources):
26
26
  s.text = re.sub(
27
- r"<\|/document\|>", f' text part {s["order"]}<|/document|>', s["text"]
27
+ r"<\|/document\|>", f" text part {s['order']}<|/document|>", s["text"]
28
28
  )
29
29
  s.text = re.sub(r"<\|info\|>(.*?)<\|\/info\|>", "", s.text)
30
30
  pages_postfix = generate_pages_postfix([s])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_sdk
3
- Version: 0.10.9
3
+ Version: 0.10.11
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Martin Fadler
@@ -1488,6 +1488,16 @@ All notable changes to this project will be documented in this file.
1488
1488
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1489
1489
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1490
1490
 
1491
+
1492
+
1493
+ ## [0.10.11] - 2025-08-24
1494
+ - Enforce usage of ruff using pipeline
1495
+
1496
+ ## [0.10.10] - 2025-08-18
1497
+ - Fix wrong name of references in `Space.Message`.
1498
+ - Fix wrong name of assessment in `Space.Message`.
1499
+ - Remove default values for `text`, `originalText` and `debugInfo` in `Space.Message` as these don't have an effect.
1500
+
1491
1501
  ## [0.10.9] - 2025-08-15
1492
1502
  - Add script to wait for content ingestion finished.
1493
1503
 
@@ -2,7 +2,7 @@ unique_sdk/__init__.py,sha256=kD6dQiLHr0eJKy5yzN0iRNO7N2v4n9TDv6h6DTHMzoo,3840
2
2
  unique_sdk/_api_requestor.py,sha256=i4gCpzx8zP95sv-AhJfpQxKvWR0U-I6lclHyV55RPtg,14397
3
3
  unique_sdk/_api_resource.py,sha256=ytjomI-IVJwsbvdPyuZCfF-bl-Abgf66bu1D34YxCu8,6244
4
4
  unique_sdk/_api_version.py,sha256=Ku4JPdeyJtnX5eJJvRCEc1_u44UObdVrvrL1T-WwWCs,46
5
- unique_sdk/_error.py,sha256=j-deT0PJ-exLCwUkqORRaxaLLrGunDag9bKJSmBBKZI,3343
5
+ unique_sdk/_error.py,sha256=IgZfBEzlU4EswgppXRQD7wdikVuD4H26pKjgyNW2Jug,3264
6
6
  unique_sdk/_http_client.py,sha256=3ws3wmFXrf_AQ7bXtAWzXWiGu7vJRXU3k5FrNwKZPBw,10496
7
7
  unique_sdk/_list_object.py,sha256=k3fqWhD-37XHh6gZMHnuqOc1Bomq265Lmy2T7Rapxrk,3949
8
8
  unique_sdk/_object_classes.py,sha256=udAQucYaJBpgo7BAvga_JXAK92hu4Ohl2mOq1aN9J_A,270
@@ -22,19 +22,19 @@ unique_sdk/api_resources/_embedding.py,sha256=C6qak7cCUBMBINfPhgH8taCJZ9n6w1MUEl
22
22
  unique_sdk/api_resources/_event.py,sha256=bpWF9vstdoAWbUzr-iiGP713ceP0zPk77GJXiImf9zg,374
23
23
  unique_sdk/api_resources/_folder.py,sha256=rDO3rHNddvVWBhM4gaut9WN1A_hASJHiFiAS6a8MszU,9772
24
24
  unique_sdk/api_resources/_integrated.py,sha256=z_DrftwjgVCi10QQqRYnG5_-95kD7Kfjogbb-dmnJuA,5854
25
- unique_sdk/api_resources/_mcp.py,sha256=jBHf89LrjdYKoMeKJHyzKWih870VvXvGIl7hpf8dGIU,3353
25
+ unique_sdk/api_resources/_mcp.py,sha256=zKh0dyn0QnkKk57N2zlGVN_GQoxEp5T2CS38vVm6jQY,3341
26
26
  unique_sdk/api_resources/_message.py,sha256=gEDIzg3METZU2k7m69meAuf0IWmZxnYOjbBKPRMwPYE,7688
27
27
  unique_sdk/api_resources/_message_assessment.py,sha256=SSfx6eW7zb_GKe8cFJzCqW-t-_eWEXxKP5cnIb0DhIc,2276
28
28
  unique_sdk/api_resources/_search.py,sha256=GQItZKoGNOVZfkLLltBmsRZYBIreRKU0lGW8Kgpj1_Q,1959
29
29
  unique_sdk/api_resources/_search_string.py,sha256=4Idw6exgZdA8qksz9WkiA68k1hTU-7yFkgT_OLU_GkE,1662
30
30
  unique_sdk/api_resources/_short_term_memory.py,sha256=vPRN-Y0WPx74E6y-A3LocGc0TxJdzT-xGL66WzZwKRg,2820
31
- unique_sdk/api_resources/_space.py,sha256=Mzl1EUn7RrfjB8fKC6f-TW9GAOl5M6JncYLrKMDa-pQ,4933
31
+ unique_sdk/api_resources/_space.py,sha256=6789zLwkoZqrEESiTJIBVaNi8kAKAZnqR0KMmW1AzgI,4905
32
32
  unique_sdk/utils/chat_history.py,sha256=5UqL9hF1O9pV7skbNOlEibF5rHdYsmG3m5-YEPUowOs,3037
33
33
  unique_sdk/utils/chat_in_space.py,sha256=3NeBjOu7p43V_6PrjwxyaTkgknUS10KE4QRuTlFDU_4,5232
34
34
  unique_sdk/utils/file_io.py,sha256=YY8B7VJcTLOPmCXByiOfNerXGlAtjCC5EVNmAbQJ3dQ,4306
35
- unique_sdk/utils/sources.py,sha256=wfboE-neMKa0Wuq9QzfAEFMkNLrIrmm0v-QF33sLo6k,4952
35
+ unique_sdk/utils/sources.py,sha256=DoxxhMLcLhmDfNarjXa41H4JD2GSSDywr71hiC-4pYc,4952
36
36
  unique_sdk/utils/token.py,sha256=AzKuAA1AwBtnvSFxGcsHLpxXr_wWE5Mj4jYBbOz2ljA,1740
37
- unique_sdk-0.10.9.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
38
- unique_sdk-0.10.9.dist-info/METADATA,sha256=HkLlEA2qV_xJPt5i7obS1trzOhzdZL0aEw4mexrODP4,50398
39
- unique_sdk-0.10.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
40
- unique_sdk-0.10.9.dist-info/RECORD,,
37
+ unique_sdk-0.10.11.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
38
+ unique_sdk-0.10.11.dist-info/METADATA,sha256=EYbdt7yEtpT9fyzaBrRe4EG2hamyPMqm53Ol2glmEBM,50714
39
+ unique_sdk-0.10.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
40
+ unique_sdk-0.10.11.dist-info/RECORD,,