unique_sdk 0.10.3__py3-none-any.whl → 0.10.4__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 unique_sdk might be problematic. Click here for more details.
- unique_sdk/api_resources/_integrated.py +87 -0
- {unique_sdk-0.10.3.dist-info → unique_sdk-0.10.4.dist-info}/METADATA +37 -1
- {unique_sdk-0.10.3.dist-info → unique_sdk-0.10.4.dist-info}/RECORD +5 -5
- {unique_sdk-0.10.3.dist-info → unique_sdk-0.10.4.dist-info}/LICENSE +0 -0
- {unique_sdk-0.10.3.dist-info → unique_sdk-0.10.4.dist-info}/WHEEL +0 -0
|
@@ -52,6 +52,47 @@ class Integrated(APIResource["Integrated"]):
|
|
|
52
52
|
startText: NotRequired["str"]
|
|
53
53
|
debugInfo: NotRequired[Dict[str, Any]]
|
|
54
54
|
|
|
55
|
+
# For further details about the responses parameters, see the OpenAI API documentation.
|
|
56
|
+
class CreateStreamResponseParams(TypedDict):
|
|
57
|
+
debugInfo: Optional[Dict[str, Any]] = None
|
|
58
|
+
input: Any
|
|
59
|
+
model: str
|
|
60
|
+
searchContext: Optional[List["Integrated.SearchResult"]] = None
|
|
61
|
+
chatId: str
|
|
62
|
+
assistantMessageId: str
|
|
63
|
+
userMessageId: str
|
|
64
|
+
startText: str | None = None
|
|
65
|
+
include: Optional[
|
|
66
|
+
list[
|
|
67
|
+
Literal[
|
|
68
|
+
"computer_call_output.output.image_url",
|
|
69
|
+
"file_search_call.results",
|
|
70
|
+
"message.input_image.image_url",
|
|
71
|
+
"reasoning.encrypted_content",
|
|
72
|
+
]
|
|
73
|
+
]
|
|
74
|
+
] = None
|
|
75
|
+
instructions: str | None = None
|
|
76
|
+
max_output_tokens: int | None = None
|
|
77
|
+
metadata: Optional[Dict[str, str]] = None
|
|
78
|
+
parallel_tool_calls: float | None = None
|
|
79
|
+
temperature: float | None = None
|
|
80
|
+
text: Any
|
|
81
|
+
tool_choice: Any
|
|
82
|
+
tools: Any
|
|
83
|
+
top_p: float | None = None
|
|
84
|
+
reasoning: Any
|
|
85
|
+
|
|
86
|
+
class ToolCall(TypedDict):
|
|
87
|
+
id: str
|
|
88
|
+
name: str | None = None
|
|
89
|
+
arguments: str | None = None
|
|
90
|
+
|
|
91
|
+
class ResponsesStreamResult(TypedDict):
|
|
92
|
+
id: str
|
|
93
|
+
message: Message
|
|
94
|
+
toolCalls: List["Integrated.ToolCall"]
|
|
95
|
+
|
|
55
96
|
@classmethod
|
|
56
97
|
def chat_stream_completion(
|
|
57
98
|
cls,
|
|
@@ -99,3 +140,49 @@ class Integrated(APIResource["Integrated"]):
|
|
|
99
140
|
params,
|
|
100
141
|
),
|
|
101
142
|
)
|
|
143
|
+
|
|
144
|
+
@classmethod
|
|
145
|
+
def responses_stream(
|
|
146
|
+
cls,
|
|
147
|
+
user_id: str,
|
|
148
|
+
company_id: str,
|
|
149
|
+
**params: Unpack["Integrated.CreateStreamResponseParams"],
|
|
150
|
+
) -> "Integrated.ResponsesStreamResult":
|
|
151
|
+
"""
|
|
152
|
+
Executes a call to the language model and streams to the chat in real-time.
|
|
153
|
+
It automatically inserts references that are mentioned by the model.
|
|
154
|
+
In the form of [sourceX]. The reference documents must be given as a list in searchContext.
|
|
155
|
+
"""
|
|
156
|
+
return cast(
|
|
157
|
+
"Integrated.Responses",
|
|
158
|
+
cls._static_request(
|
|
159
|
+
"post",
|
|
160
|
+
"/integrated/chat/stream-responses",
|
|
161
|
+
user_id,
|
|
162
|
+
company_id,
|
|
163
|
+
params,
|
|
164
|
+
),
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
@classmethod
|
|
168
|
+
async def responses_stream_async(
|
|
169
|
+
cls,
|
|
170
|
+
user_id: str,
|
|
171
|
+
company_id: str,
|
|
172
|
+
**params: Unpack["Integrated.CreateStreamResponseParams"],
|
|
173
|
+
) -> "Integrated.ResponsesStreamResult":
|
|
174
|
+
"""
|
|
175
|
+
Executes a call to the language model and streams to the chat in real-time.
|
|
176
|
+
It automatically inserts references that are mentioned by the model.
|
|
177
|
+
In the form of [sourceX]. The reference documents must be given as a list in searchContext.
|
|
178
|
+
"""
|
|
179
|
+
return cast(
|
|
180
|
+
"Integrated.Responses",
|
|
181
|
+
cls._static_request(
|
|
182
|
+
"post",
|
|
183
|
+
"/integrated/chat/stream-responses",
|
|
184
|
+
user_id,
|
|
185
|
+
company_id,
|
|
186
|
+
params,
|
|
187
|
+
),
|
|
188
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_sdk
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.4
|
|
4
4
|
Summary:
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Martin Fadler
|
|
@@ -605,6 +605,39 @@ unique_sdk.Integrated.chat_stream_completion(
|
|
|
605
605
|
|
|
606
606
|
**Warning:** Currently, the deletion of a chat message does not automatically sync with the user UI. Users must refresh the chat page to view the updated state. This issue will be addressed in a future update of our API.
|
|
607
607
|
|
|
608
|
+
|
|
609
|
+
#### `unique_sdk.Integrated.responses_stream`
|
|
610
|
+
|
|
611
|
+
Streams the answer to the chat frontend using the Responses API. Given the messages.
|
|
612
|
+
|
|
613
|
+
if the stream creates [source0] it is referenced with the references from the search context.
|
|
614
|
+
|
|
615
|
+
E.g.
|
|
616
|
+
|
|
617
|
+
```
|
|
618
|
+
Hello this information is from [source1]
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
adds the reference at index 1 and then changes the text to:
|
|
622
|
+
|
|
623
|
+
```
|
|
624
|
+
Hello this information is from <sub>0</sub>
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
```python
|
|
628
|
+
unique_sdk.Integrated.responses_stream(
|
|
629
|
+
user_id=userId,
|
|
630
|
+
company_id=companyId,
|
|
631
|
+
model="AZURE_o3_2025_0416",
|
|
632
|
+
assistantMessageId=assistantMessageId,
|
|
633
|
+
userMessageId=userMessageId,
|
|
634
|
+
input="Tell me about the curious case of neural text degeneration",
|
|
635
|
+
chatId=chatId,
|
|
636
|
+
)
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
**Warning:** Currently, the deletion of a chat message does not automatically sync with the user UI. Users must refresh the chat page to view the updated state. This issue will be addressed in a future update of our API.
|
|
640
|
+
|
|
608
641
|
### Chat Completion
|
|
609
642
|
|
|
610
643
|
#### `unique_sdk.ChatCompletion.create`
|
|
@@ -1338,6 +1371,9 @@ All notable changes to this project will be documented in this file.
|
|
|
1338
1371
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
1339
1372
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
1340
1373
|
|
|
1374
|
+
## [0.10.4] - 2025-08-05
|
|
1375
|
+
- Add support for reasoning API with streaming within a chat.
|
|
1376
|
+
|
|
1341
1377
|
## [0.10.3] - 2025-08-05
|
|
1342
1378
|
- Expose scoreThreshold param for search.
|
|
1343
1379
|
|
|
@@ -20,7 +20,7 @@ unique_sdk/api_resources/_content.py,sha256=Rl1Pb0vUQ9EkEQa0XTGOLZamAYlZaz7h6jNW
|
|
|
20
20
|
unique_sdk/api_resources/_embedding.py,sha256=C6qak7cCUBMBINfPhgH8taCJZ9n6w1MUElqDJJ8dG10,1281
|
|
21
21
|
unique_sdk/api_resources/_event.py,sha256=bpWF9vstdoAWbUzr-iiGP713ceP0zPk77GJXiImf9zg,374
|
|
22
22
|
unique_sdk/api_resources/_folder.py,sha256=dmPorUoOJSe-hcxlJq3RnkQeZg3gPqGF37ZsLgnloT0,8335
|
|
23
|
-
unique_sdk/api_resources/_integrated.py,sha256=
|
|
23
|
+
unique_sdk/api_resources/_integrated.py,sha256=z_DrftwjgVCi10QQqRYnG5_-95kD7Kfjogbb-dmnJuA,5854
|
|
24
24
|
unique_sdk/api_resources/_mcp.py,sha256=jBHf89LrjdYKoMeKJHyzKWih870VvXvGIl7hpf8dGIU,3353
|
|
25
25
|
unique_sdk/api_resources/_message.py,sha256=gEDIzg3METZU2k7m69meAuf0IWmZxnYOjbBKPRMwPYE,7688
|
|
26
26
|
unique_sdk/api_resources/_message_assessment.py,sha256=SSfx6eW7zb_GKe8cFJzCqW-t-_eWEXxKP5cnIb0DhIc,2276
|
|
@@ -33,7 +33,7 @@ unique_sdk/utils/chat_in_space.py,sha256=nYmgQYhIxqQex_6zjdCfNuGnjoU14WkxUN6_zmS
|
|
|
33
33
|
unique_sdk/utils/file_io.py,sha256=YY8B7VJcTLOPmCXByiOfNerXGlAtjCC5EVNmAbQJ3dQ,4306
|
|
34
34
|
unique_sdk/utils/sources.py,sha256=wfboE-neMKa0Wuq9QzfAEFMkNLrIrmm0v-QF33sLo6k,4952
|
|
35
35
|
unique_sdk/utils/token.py,sha256=AzKuAA1AwBtnvSFxGcsHLpxXr_wWE5Mj4jYBbOz2ljA,1740
|
|
36
|
-
unique_sdk-0.10.
|
|
37
|
-
unique_sdk-0.10.
|
|
38
|
-
unique_sdk-0.10.
|
|
39
|
-
unique_sdk-0.10.
|
|
36
|
+
unique_sdk-0.10.4.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
|
|
37
|
+
unique_sdk-0.10.4.dist-info/METADATA,sha256=YMsJPKoqFCTfjAyP9d3xtJWHuTUq7r-JIRaB0mEhwI0,46007
|
|
38
|
+
unique_sdk-0.10.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
39
|
+
unique_sdk-0.10.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|