mixpeek 0.8.41__py3-none-any.whl → 0.10.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.
- mixpeek/__init__.py +93 -1
- mixpeek/_base_client.py +2041 -0
- mixpeek/_client.py +444 -0
- mixpeek/_compat.py +219 -0
- mixpeek/_constants.py +14 -0
- mixpeek/_exceptions.py +108 -0
- mixpeek/_files.py +123 -0
- mixpeek/_models.py +785 -0
- mixpeek/_qs.py +150 -0
- mixpeek/_resource.py +43 -0
- mixpeek/_response.py +824 -0
- mixpeek/_streaming.py +333 -0
- mixpeek/_types.py +217 -0
- mixpeek/_utils/__init__.py +55 -0
- mixpeek/_utils/_logs.py +25 -0
- mixpeek/_utils/_proxy.py +62 -0
- mixpeek/_utils/_reflection.py +42 -0
- mixpeek/_utils/_streams.py +12 -0
- mixpeek/_utils/_sync.py +81 -0
- mixpeek/_utils/_transform.py +382 -0
- mixpeek/_utils/_typing.py +120 -0
- mixpeek/_utils/_utils.py +397 -0
- mixpeek/_version.py +4 -0
- mixpeek/lib/.keep +4 -0
- mixpeek/resources/__init__.py +159 -0
- mixpeek/resources/accounts/__init__.py +33 -0
- mixpeek/resources/accounts/accounts.py +102 -0
- mixpeek/resources/accounts/private.py +232 -0
- mixpeek/resources/agent/__init__.py +33 -0
- mixpeek/resources/agent/agent.py +225 -0
- mixpeek/resources/agent/task.py +189 -0
- mixpeek/resources/collections/__init__.py +33 -0
- mixpeek/resources/collections/collections.py +459 -0
- mixpeek/resources/collections/files.py +679 -0
- mixpeek/resources/describe.py +338 -0
- mixpeek/resources/embed.py +234 -0
- mixpeek/resources/indexes.py +506 -0
- mixpeek/resources/read.py +183 -0
- mixpeek/resources/recognize.py +183 -0
- mixpeek/resources/search.py +542 -0
- mixpeek/resources/tasks.py +294 -0
- mixpeek/resources/transcribe.py +192 -0
- mixpeek/types/__init__.py +19 -0
- mixpeek/types/accounts/__init__.py +6 -0
- mixpeek/types/accounts/private_update_params.py +25 -0
- mixpeek/types/accounts/user.py +32 -0
- mixpeek/types/agent/__init__.py +3 -0
- mixpeek/types/agent_create_params.py +18 -0
- mixpeek/types/agentresponse.py +11 -0
- mixpeek/types/collection_search_params.py +29 -0
- mixpeek/types/collections/__init__.py +9 -0
- mixpeek/types/collections/file_create_params.py +31 -0
- mixpeek/types/collections/file_full_params.py +22 -0
- mixpeek/types/collections/file_update_params.py +18 -0
- mixpeek/types/collections/fileresponse.py +23 -0
- mixpeek/types/collections/groupedfiledata.py +38 -0
- mixpeek/types/describe_upload_params.py +21 -0
- mixpeek/types/describe_url_params.py +20 -0
- mixpeek/types/embed_create_params.py +29 -0
- mixpeek/types/embeddingresponse.py +15 -0
- mixpeek/types/index_face_params.py +23 -0
- mixpeek/types/index_upload_params.py +27 -0
- mixpeek/types/index_url_params.py +159 -0
- mixpeek/types/search_text_params.py +45 -0
- mixpeek/types/search_upload_params.py +25 -0
- mixpeek/types/search_url_params.py +45 -0
- mixpeek/types/taskresponse.py +15 -0
- mixpeek/types/transcribe_url_params.py +18 -0
- mixpeek-0.10.0.dist-info/METADATA +356 -0
- mixpeek-0.10.0.dist-info/RECORD +73 -0
- {mixpeek-0.8.41.dist-info → mixpeek-0.10.0.dist-info}/WHEEL +1 -2
- mixpeek-0.10.0.dist-info/licenses/LICENSE +201 -0
- mixpeek/client.py +0 -27
- mixpeek/endpoints/collections.py +0 -86
- mixpeek/endpoints/embed.py +0 -66
- mixpeek/endpoints/index.py +0 -51
- mixpeek/endpoints/register.py +0 -34
- mixpeek/endpoints/search.py +0 -67
- mixpeek/endpoints/tasks.py +0 -26
- mixpeek/endpoints/tools.py +0 -138
- mixpeek/exceptions.py +0 -13
- mixpeek-0.8.41.dist-info/METADATA +0 -375
- mixpeek-0.8.41.dist-info/RECORD +0 -15
- mixpeek-0.8.41.dist-info/top_level.txt +0 -1
- /mixpeek/{endpoints/__init__.py → py.typed} +0 -0
@@ -0,0 +1,294 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import httpx
|
6
|
+
|
7
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
8
|
+
from .._utils import strip_not_given
|
9
|
+
from .._compat import cached_property
|
10
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
11
|
+
from .._response import (
|
12
|
+
to_raw_response_wrapper,
|
13
|
+
to_streamed_response_wrapper,
|
14
|
+
async_to_raw_response_wrapper,
|
15
|
+
async_to_streamed_response_wrapper,
|
16
|
+
)
|
17
|
+
from .._base_client import make_request_options
|
18
|
+
from ..types.taskresponse import Taskresponse
|
19
|
+
|
20
|
+
__all__ = ["TasksResource", "AsyncTasksResource"]
|
21
|
+
|
22
|
+
|
23
|
+
class TasksResource(SyncAPIResource):
|
24
|
+
@cached_property
|
25
|
+
def with_raw_response(self) -> TasksResourceWithRawResponse:
|
26
|
+
"""
|
27
|
+
This property can be used as a prefix for any HTTP method call to return the
|
28
|
+
the raw response object instead of the parsed content.
|
29
|
+
|
30
|
+
For more information, see https://www.github.com/mixpeek/python-client#accessing-raw-response-data-eg-headers
|
31
|
+
"""
|
32
|
+
return TasksResourceWithRawResponse(self)
|
33
|
+
|
34
|
+
@cached_property
|
35
|
+
def with_streaming_response(self) -> TasksResourceWithStreamingResponse:
|
36
|
+
"""
|
37
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
38
|
+
|
39
|
+
For more information, see https://www.github.com/mixpeek/python-client#with_streaming_response
|
40
|
+
"""
|
41
|
+
return TasksResourceWithStreamingResponse(self)
|
42
|
+
|
43
|
+
def retrieve(
|
44
|
+
self,
|
45
|
+
task_id: str,
|
46
|
+
*,
|
47
|
+
authorization: str | NotGiven = NOT_GIVEN,
|
48
|
+
index_id: str | NotGiven = NOT_GIVEN,
|
49
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
50
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
51
|
+
extra_headers: Headers | None = None,
|
52
|
+
extra_query: Query | None = None,
|
53
|
+
extra_body: Body | None = None,
|
54
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
55
|
+
) -> Taskresponse:
|
56
|
+
"""
|
57
|
+
Get Task
|
58
|
+
|
59
|
+
Args:
|
60
|
+
index_id: filter by organization
|
61
|
+
|
62
|
+
extra_headers: Send extra headers
|
63
|
+
|
64
|
+
extra_query: Add additional query parameters to the request
|
65
|
+
|
66
|
+
extra_body: Add additional JSON properties to the request
|
67
|
+
|
68
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
69
|
+
"""
|
70
|
+
if not task_id:
|
71
|
+
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
72
|
+
extra_headers = {
|
73
|
+
**strip_not_given(
|
74
|
+
{
|
75
|
+
"Authorization": authorization,
|
76
|
+
"index-id": index_id,
|
77
|
+
}
|
78
|
+
),
|
79
|
+
**(extra_headers or {}),
|
80
|
+
}
|
81
|
+
return self._get(
|
82
|
+
f"/tasks/{task_id}",
|
83
|
+
options=make_request_options(
|
84
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
85
|
+
),
|
86
|
+
cast_to=Taskresponse,
|
87
|
+
)
|
88
|
+
|
89
|
+
def delete(
|
90
|
+
self,
|
91
|
+
task_id: str,
|
92
|
+
*,
|
93
|
+
authorization: str | NotGiven = NOT_GIVEN,
|
94
|
+
index_id: str | NotGiven = NOT_GIVEN,
|
95
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
96
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
97
|
+
extra_headers: Headers | None = None,
|
98
|
+
extra_query: Query | None = None,
|
99
|
+
extra_body: Body | None = None,
|
100
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
101
|
+
) -> object:
|
102
|
+
"""
|
103
|
+
Kill Task
|
104
|
+
|
105
|
+
Args:
|
106
|
+
index_id: filter by organization
|
107
|
+
|
108
|
+
extra_headers: Send extra headers
|
109
|
+
|
110
|
+
extra_query: Add additional query parameters to the request
|
111
|
+
|
112
|
+
extra_body: Add additional JSON properties to the request
|
113
|
+
|
114
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
115
|
+
"""
|
116
|
+
if not task_id:
|
117
|
+
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
118
|
+
extra_headers = {
|
119
|
+
**strip_not_given(
|
120
|
+
{
|
121
|
+
"Authorization": authorization,
|
122
|
+
"index-id": index_id,
|
123
|
+
}
|
124
|
+
),
|
125
|
+
**(extra_headers or {}),
|
126
|
+
}
|
127
|
+
return self._delete(
|
128
|
+
f"/tasks/{task_id}",
|
129
|
+
options=make_request_options(
|
130
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
131
|
+
),
|
132
|
+
cast_to=object,
|
133
|
+
)
|
134
|
+
|
135
|
+
|
136
|
+
class AsyncTasksResource(AsyncAPIResource):
|
137
|
+
@cached_property
|
138
|
+
def with_raw_response(self) -> AsyncTasksResourceWithRawResponse:
|
139
|
+
"""
|
140
|
+
This property can be used as a prefix for any HTTP method call to return the
|
141
|
+
the raw response object instead of the parsed content.
|
142
|
+
|
143
|
+
For more information, see https://www.github.com/mixpeek/python-client#accessing-raw-response-data-eg-headers
|
144
|
+
"""
|
145
|
+
return AsyncTasksResourceWithRawResponse(self)
|
146
|
+
|
147
|
+
@cached_property
|
148
|
+
def with_streaming_response(self) -> AsyncTasksResourceWithStreamingResponse:
|
149
|
+
"""
|
150
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
151
|
+
|
152
|
+
For more information, see https://www.github.com/mixpeek/python-client#with_streaming_response
|
153
|
+
"""
|
154
|
+
return AsyncTasksResourceWithStreamingResponse(self)
|
155
|
+
|
156
|
+
async def retrieve(
|
157
|
+
self,
|
158
|
+
task_id: str,
|
159
|
+
*,
|
160
|
+
authorization: str | NotGiven = NOT_GIVEN,
|
161
|
+
index_id: str | NotGiven = NOT_GIVEN,
|
162
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
163
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
164
|
+
extra_headers: Headers | None = None,
|
165
|
+
extra_query: Query | None = None,
|
166
|
+
extra_body: Body | None = None,
|
167
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
168
|
+
) -> Taskresponse:
|
169
|
+
"""
|
170
|
+
Get Task
|
171
|
+
|
172
|
+
Args:
|
173
|
+
index_id: filter by organization
|
174
|
+
|
175
|
+
extra_headers: Send extra headers
|
176
|
+
|
177
|
+
extra_query: Add additional query parameters to the request
|
178
|
+
|
179
|
+
extra_body: Add additional JSON properties to the request
|
180
|
+
|
181
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
182
|
+
"""
|
183
|
+
if not task_id:
|
184
|
+
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
185
|
+
extra_headers = {
|
186
|
+
**strip_not_given(
|
187
|
+
{
|
188
|
+
"Authorization": authorization,
|
189
|
+
"index-id": index_id,
|
190
|
+
}
|
191
|
+
),
|
192
|
+
**(extra_headers or {}),
|
193
|
+
}
|
194
|
+
return await self._get(
|
195
|
+
f"/tasks/{task_id}",
|
196
|
+
options=make_request_options(
|
197
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
198
|
+
),
|
199
|
+
cast_to=Taskresponse,
|
200
|
+
)
|
201
|
+
|
202
|
+
async def delete(
|
203
|
+
self,
|
204
|
+
task_id: str,
|
205
|
+
*,
|
206
|
+
authorization: str | NotGiven = NOT_GIVEN,
|
207
|
+
index_id: str | NotGiven = NOT_GIVEN,
|
208
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
209
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
210
|
+
extra_headers: Headers | None = None,
|
211
|
+
extra_query: Query | None = None,
|
212
|
+
extra_body: Body | None = None,
|
213
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
214
|
+
) -> object:
|
215
|
+
"""
|
216
|
+
Kill Task
|
217
|
+
|
218
|
+
Args:
|
219
|
+
index_id: filter by organization
|
220
|
+
|
221
|
+
extra_headers: Send extra headers
|
222
|
+
|
223
|
+
extra_query: Add additional query parameters to the request
|
224
|
+
|
225
|
+
extra_body: Add additional JSON properties to the request
|
226
|
+
|
227
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
228
|
+
"""
|
229
|
+
if not task_id:
|
230
|
+
raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
|
231
|
+
extra_headers = {
|
232
|
+
**strip_not_given(
|
233
|
+
{
|
234
|
+
"Authorization": authorization,
|
235
|
+
"index-id": index_id,
|
236
|
+
}
|
237
|
+
),
|
238
|
+
**(extra_headers or {}),
|
239
|
+
}
|
240
|
+
return await self._delete(
|
241
|
+
f"/tasks/{task_id}",
|
242
|
+
options=make_request_options(
|
243
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
244
|
+
),
|
245
|
+
cast_to=object,
|
246
|
+
)
|
247
|
+
|
248
|
+
|
249
|
+
class TasksResourceWithRawResponse:
|
250
|
+
def __init__(self, tasks: TasksResource) -> None:
|
251
|
+
self._tasks = tasks
|
252
|
+
|
253
|
+
self.retrieve = to_raw_response_wrapper(
|
254
|
+
tasks.retrieve,
|
255
|
+
)
|
256
|
+
self.delete = to_raw_response_wrapper(
|
257
|
+
tasks.delete,
|
258
|
+
)
|
259
|
+
|
260
|
+
|
261
|
+
class AsyncTasksResourceWithRawResponse:
|
262
|
+
def __init__(self, tasks: AsyncTasksResource) -> None:
|
263
|
+
self._tasks = tasks
|
264
|
+
|
265
|
+
self.retrieve = async_to_raw_response_wrapper(
|
266
|
+
tasks.retrieve,
|
267
|
+
)
|
268
|
+
self.delete = async_to_raw_response_wrapper(
|
269
|
+
tasks.delete,
|
270
|
+
)
|
271
|
+
|
272
|
+
|
273
|
+
class TasksResourceWithStreamingResponse:
|
274
|
+
def __init__(self, tasks: TasksResource) -> None:
|
275
|
+
self._tasks = tasks
|
276
|
+
|
277
|
+
self.retrieve = to_streamed_response_wrapper(
|
278
|
+
tasks.retrieve,
|
279
|
+
)
|
280
|
+
self.delete = to_streamed_response_wrapper(
|
281
|
+
tasks.delete,
|
282
|
+
)
|
283
|
+
|
284
|
+
|
285
|
+
class AsyncTasksResourceWithStreamingResponse:
|
286
|
+
def __init__(self, tasks: AsyncTasksResource) -> None:
|
287
|
+
self._tasks = tasks
|
288
|
+
|
289
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
290
|
+
tasks.retrieve,
|
291
|
+
)
|
292
|
+
self.delete = async_to_streamed_response_wrapper(
|
293
|
+
tasks.delete,
|
294
|
+
)
|
@@ -0,0 +1,192 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import httpx
|
6
|
+
|
7
|
+
from ..types import transcribe_url_params
|
8
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
9
|
+
from .._utils import (
|
10
|
+
maybe_transform,
|
11
|
+
strip_not_given,
|
12
|
+
async_maybe_transform,
|
13
|
+
)
|
14
|
+
from .._compat import cached_property
|
15
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
16
|
+
from .._response import (
|
17
|
+
to_raw_response_wrapper,
|
18
|
+
to_streamed_response_wrapper,
|
19
|
+
async_to_raw_response_wrapper,
|
20
|
+
async_to_streamed_response_wrapper,
|
21
|
+
)
|
22
|
+
from .._base_client import make_request_options
|
23
|
+
|
24
|
+
__all__ = ["TranscribeResource", "AsyncTranscribeResource"]
|
25
|
+
|
26
|
+
|
27
|
+
class TranscribeResource(SyncAPIResource):
|
28
|
+
@cached_property
|
29
|
+
def with_raw_response(self) -> TranscribeResourceWithRawResponse:
|
30
|
+
"""
|
31
|
+
This property can be used as a prefix for any HTTP method call to return the
|
32
|
+
the raw response object instead of the parsed content.
|
33
|
+
|
34
|
+
For more information, see https://www.github.com/mixpeek/python-client#accessing-raw-response-data-eg-headers
|
35
|
+
"""
|
36
|
+
return TranscribeResourceWithRawResponse(self)
|
37
|
+
|
38
|
+
@cached_property
|
39
|
+
def with_streaming_response(self) -> TranscribeResourceWithStreamingResponse:
|
40
|
+
"""
|
41
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
42
|
+
|
43
|
+
For more information, see https://www.github.com/mixpeek/python-client#with_streaming_response
|
44
|
+
"""
|
45
|
+
return TranscribeResourceWithStreamingResponse(self)
|
46
|
+
|
47
|
+
def url(
|
48
|
+
self,
|
49
|
+
*,
|
50
|
+
url: str,
|
51
|
+
authorization: str | NotGiven = NOT_GIVEN,
|
52
|
+
index_id: str | NotGiven = NOT_GIVEN,
|
53
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
54
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
55
|
+
extra_headers: Headers | None = None,
|
56
|
+
extra_query: Query | None = None,
|
57
|
+
extra_body: Body | None = None,
|
58
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
59
|
+
) -> object:
|
60
|
+
"""
|
61
|
+
Transcribe By Url
|
62
|
+
|
63
|
+
Args:
|
64
|
+
index_id: filter by organization
|
65
|
+
|
66
|
+
extra_headers: Send extra headers
|
67
|
+
|
68
|
+
extra_query: Add additional query parameters to the request
|
69
|
+
|
70
|
+
extra_body: Add additional JSON properties to the request
|
71
|
+
|
72
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
73
|
+
"""
|
74
|
+
extra_headers = {
|
75
|
+
**strip_not_given(
|
76
|
+
{
|
77
|
+
"Authorization": authorization,
|
78
|
+
"index-id": index_id,
|
79
|
+
}
|
80
|
+
),
|
81
|
+
**(extra_headers or {}),
|
82
|
+
}
|
83
|
+
return self._post(
|
84
|
+
"/transcribe/url",
|
85
|
+
body=maybe_transform({"url": url}, transcribe_url_params.TranscribeURLParams),
|
86
|
+
options=make_request_options(
|
87
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
88
|
+
),
|
89
|
+
cast_to=object,
|
90
|
+
)
|
91
|
+
|
92
|
+
|
93
|
+
class AsyncTranscribeResource(AsyncAPIResource):
|
94
|
+
@cached_property
|
95
|
+
def with_raw_response(self) -> AsyncTranscribeResourceWithRawResponse:
|
96
|
+
"""
|
97
|
+
This property can be used as a prefix for any HTTP method call to return the
|
98
|
+
the raw response object instead of the parsed content.
|
99
|
+
|
100
|
+
For more information, see https://www.github.com/mixpeek/python-client#accessing-raw-response-data-eg-headers
|
101
|
+
"""
|
102
|
+
return AsyncTranscribeResourceWithRawResponse(self)
|
103
|
+
|
104
|
+
@cached_property
|
105
|
+
def with_streaming_response(self) -> AsyncTranscribeResourceWithStreamingResponse:
|
106
|
+
"""
|
107
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
108
|
+
|
109
|
+
For more information, see https://www.github.com/mixpeek/python-client#with_streaming_response
|
110
|
+
"""
|
111
|
+
return AsyncTranscribeResourceWithStreamingResponse(self)
|
112
|
+
|
113
|
+
async def url(
|
114
|
+
self,
|
115
|
+
*,
|
116
|
+
url: str,
|
117
|
+
authorization: str | NotGiven = NOT_GIVEN,
|
118
|
+
index_id: str | NotGiven = NOT_GIVEN,
|
119
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
120
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
121
|
+
extra_headers: Headers | None = None,
|
122
|
+
extra_query: Query | None = None,
|
123
|
+
extra_body: Body | None = None,
|
124
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
125
|
+
) -> object:
|
126
|
+
"""
|
127
|
+
Transcribe By Url
|
128
|
+
|
129
|
+
Args:
|
130
|
+
index_id: filter by organization
|
131
|
+
|
132
|
+
extra_headers: Send extra headers
|
133
|
+
|
134
|
+
extra_query: Add additional query parameters to the request
|
135
|
+
|
136
|
+
extra_body: Add additional JSON properties to the request
|
137
|
+
|
138
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
139
|
+
"""
|
140
|
+
extra_headers = {
|
141
|
+
**strip_not_given(
|
142
|
+
{
|
143
|
+
"Authorization": authorization,
|
144
|
+
"index-id": index_id,
|
145
|
+
}
|
146
|
+
),
|
147
|
+
**(extra_headers or {}),
|
148
|
+
}
|
149
|
+
return await self._post(
|
150
|
+
"/transcribe/url",
|
151
|
+
body=await async_maybe_transform({"url": url}, transcribe_url_params.TranscribeURLParams),
|
152
|
+
options=make_request_options(
|
153
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
154
|
+
),
|
155
|
+
cast_to=object,
|
156
|
+
)
|
157
|
+
|
158
|
+
|
159
|
+
class TranscribeResourceWithRawResponse:
|
160
|
+
def __init__(self, transcribe: TranscribeResource) -> None:
|
161
|
+
self._transcribe = transcribe
|
162
|
+
|
163
|
+
self.url = to_raw_response_wrapper(
|
164
|
+
transcribe.url,
|
165
|
+
)
|
166
|
+
|
167
|
+
|
168
|
+
class AsyncTranscribeResourceWithRawResponse:
|
169
|
+
def __init__(self, transcribe: AsyncTranscribeResource) -> None:
|
170
|
+
self._transcribe = transcribe
|
171
|
+
|
172
|
+
self.url = async_to_raw_response_wrapper(
|
173
|
+
transcribe.url,
|
174
|
+
)
|
175
|
+
|
176
|
+
|
177
|
+
class TranscribeResourceWithStreamingResponse:
|
178
|
+
def __init__(self, transcribe: TranscribeResource) -> None:
|
179
|
+
self._transcribe = transcribe
|
180
|
+
|
181
|
+
self.url = to_streamed_response_wrapper(
|
182
|
+
transcribe.url,
|
183
|
+
)
|
184
|
+
|
185
|
+
|
186
|
+
class AsyncTranscribeResourceWithStreamingResponse:
|
187
|
+
def __init__(self, transcribe: AsyncTranscribeResource) -> None:
|
188
|
+
self._transcribe = transcribe
|
189
|
+
|
190
|
+
self.url = async_to_streamed_response_wrapper(
|
191
|
+
transcribe.url,
|
192
|
+
)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from .taskresponse import Taskresponse as Taskresponse
|
6
|
+
from .agentresponse import Agentresponse as Agentresponse
|
7
|
+
from .index_url_params import IndexURLParams as IndexURLParams
|
8
|
+
from .embeddingresponse import Embeddingresponse as Embeddingresponse
|
9
|
+
from .index_face_params import IndexFaceParams as IndexFaceParams
|
10
|
+
from .search_url_params import SearchURLParams as SearchURLParams
|
11
|
+
from .search_text_params import SearchTextParams as SearchTextParams
|
12
|
+
from .agent_create_params import AgentCreateParams as AgentCreateParams
|
13
|
+
from .describe_url_params import DescribeURLParams as DescribeURLParams
|
14
|
+
from .embed_create_params import EmbedCreateParams as EmbedCreateParams
|
15
|
+
from .index_upload_params import IndexUploadParams as IndexUploadParams
|
16
|
+
from .search_upload_params import SearchUploadParams as SearchUploadParams
|
17
|
+
from .transcribe_url_params import TranscribeURLParams as TranscribeURLParams
|
18
|
+
from .describe_upload_params import DescribeUploadParams as DescribeUploadParams
|
19
|
+
from .collection_search_params import CollectionSearchParams as CollectionSearchParams
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Union, Iterable, Optional
|
6
|
+
from datetime import datetime
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
8
|
+
|
9
|
+
from ..._utils import PropertyInfo
|
10
|
+
|
11
|
+
__all__ = ["PrivateUpdateParams", "APIKey"]
|
12
|
+
|
13
|
+
|
14
|
+
class PrivateUpdateParams(TypedDict, total=False):
|
15
|
+
api_keys: Optional[Iterable[APIKey]]
|
16
|
+
|
17
|
+
metadata: Optional[object]
|
18
|
+
|
19
|
+
|
20
|
+
class APIKey(TypedDict, total=False):
|
21
|
+
created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
22
|
+
|
23
|
+
key: str
|
24
|
+
|
25
|
+
name: str
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import List, Optional
|
4
|
+
from datetime import datetime
|
5
|
+
|
6
|
+
from ..._models import BaseModel
|
7
|
+
|
8
|
+
__all__ = ["User", "APIKey"]
|
9
|
+
|
10
|
+
|
11
|
+
class APIKey(BaseModel):
|
12
|
+
created_at: Optional[datetime] = None
|
13
|
+
|
14
|
+
key: Optional[str] = None
|
15
|
+
|
16
|
+
name: Optional[str] = None
|
17
|
+
|
18
|
+
|
19
|
+
class User(BaseModel):
|
20
|
+
email: str
|
21
|
+
|
22
|
+
account_type: Optional[str] = None
|
23
|
+
|
24
|
+
api_keys: Optional[List[APIKey]] = None
|
25
|
+
|
26
|
+
credit_count: Optional[int] = None
|
27
|
+
|
28
|
+
index_ids: Optional[List[str]] = None
|
29
|
+
|
30
|
+
metadata: Optional[object] = None
|
31
|
+
|
32
|
+
user_id: Optional[str] = None
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
6
|
+
|
7
|
+
from .._utils import PropertyInfo
|
8
|
+
|
9
|
+
__all__ = ["AgentCreateParams"]
|
10
|
+
|
11
|
+
|
12
|
+
class AgentCreateParams(TypedDict, total=False):
|
13
|
+
prompt: Required[str]
|
14
|
+
|
15
|
+
authorization: Annotated[str, PropertyInfo(alias="Authorization")]
|
16
|
+
|
17
|
+
index_id: Annotated[str, PropertyInfo(alias="index-id")]
|
18
|
+
"""filter by organization"""
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Optional
|
6
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
7
|
+
|
8
|
+
from .._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["CollectionSearchParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class CollectionSearchParams(TypedDict, total=False):
|
14
|
+
collection_id: Required[str]
|
15
|
+
|
16
|
+
query: Required[str]
|
17
|
+
|
18
|
+
page: int
|
19
|
+
|
20
|
+
page_size: int
|
21
|
+
|
22
|
+
sort_by: Optional[str]
|
23
|
+
|
24
|
+
sort_order: Optional[Literal["asc", "desc"]]
|
25
|
+
|
26
|
+
authorization: Annotated[str, PropertyInfo(alias="Authorization")]
|
27
|
+
|
28
|
+
index_id: Annotated[str, PropertyInfo(alias="index-id")]
|
29
|
+
"""filter by organization"""
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from .fileresponse import Fileresponse as Fileresponse
|
6
|
+
from .groupedfiledata import Groupedfiledata as Groupedfiledata
|
7
|
+
from .file_full_params import FileFullParams as FileFullParams
|
8
|
+
from .file_create_params import FileCreateParams as FileCreateParams
|
9
|
+
from .file_update_params import FileUpdateParams as FileUpdateParams
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Optional
|
6
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
7
|
+
|
8
|
+
from ..._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["FileCreateParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class FileCreateParams(TypedDict, total=False):
|
14
|
+
collection_id: Required[str]
|
15
|
+
|
16
|
+
filters: Optional[object]
|
17
|
+
|
18
|
+
page: int
|
19
|
+
|
20
|
+
page_size: int
|
21
|
+
|
22
|
+
randomize: bool
|
23
|
+
|
24
|
+
sort_by: Optional[str]
|
25
|
+
|
26
|
+
sort_order: Optional[Literal["asc", "desc"]]
|
27
|
+
|
28
|
+
authorization: Annotated[str, PropertyInfo(alias="Authorization")]
|
29
|
+
|
30
|
+
index_id: Annotated[str, PropertyInfo(alias="index-id")]
|
31
|
+
"""filter by organization"""
|