mixpeek 0.6.8__py3-none-any.whl → 0.6.9__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.
Files changed (85) hide show
  1. mixpeek/__init__.py +1 -106
  2. mixpeek/client.py +21 -65
  3. mixpeek/endpoints/connections.py +16 -0
  4. mixpeek/endpoints/embed.py +50 -0
  5. mixpeek/endpoints/extract.py +16 -0
  6. mixpeek/endpoints/generate.py +17 -0
  7. mixpeek/endpoints/tools.py +23 -0
  8. mixpeek/exceptions.py +13 -0
  9. mixpeek-0.6.9.dist-info/METADATA +68 -0
  10. mixpeek-0.6.9.dist-info/RECORD +13 -0
  11. {mixpeek-0.6.8.dist-info → mixpeek-0.6.9.dist-info}/WHEEL +2 -1
  12. mixpeek-0.6.9.dist-info/top_level.txt +1 -0
  13. mixpeek/base_client.py +0 -1015
  14. mixpeek/core/__init__.py +0 -27
  15. mixpeek/core/api_error.py +0 -15
  16. mixpeek/core/client_wrapper.py +0 -83
  17. mixpeek/core/datetime_utils.py +0 -28
  18. mixpeek/core/file.py +0 -38
  19. mixpeek/core/http_client.py +0 -130
  20. mixpeek/core/jsonable_encoder.py +0 -99
  21. mixpeek/core/pydantic_utilities.py +0 -12
  22. mixpeek/core/remove_none_from_dict.py +0 -11
  23. mixpeek/core/request_options.py +0 -32
  24. mixpeek/environment.py +0 -7
  25. mixpeek/errors/__init__.py +0 -17
  26. mixpeek/errors/bad_request_error.py +0 -9
  27. mixpeek/errors/forbidden_error.py +0 -9
  28. mixpeek/errors/internal_server_error.py +0 -9
  29. mixpeek/errors/not_found_error.py +0 -9
  30. mixpeek/errors/unauthorized_error.py +0 -9
  31. mixpeek/errors/unprocessable_entity_error.py +0 -9
  32. mixpeek/pipeline/__init__.py +0 -2
  33. mixpeek/pipeline/client.py +0 -482
  34. mixpeek/storage/__init__.py +0 -5
  35. mixpeek/storage/client.py +0 -145
  36. mixpeek/storage/sample/__init__.py +0 -2
  37. mixpeek/storage/sample/client.py +0 -286
  38. mixpeek/types/__init__.py +0 -81
  39. mixpeek/types/api_key.py +0 -27
  40. mixpeek/types/audio_params.py +0 -25
  41. mixpeek/types/configs_response.py +0 -38
  42. mixpeek/types/connection.py +0 -32
  43. mixpeek/types/connection_engine.py +0 -5
  44. mixpeek/types/csv_params.py +0 -25
  45. mixpeek/types/destination.py +0 -38
  46. mixpeek/types/embedding_response.py +0 -30
  47. mixpeek/types/error_message.py +0 -25
  48. mixpeek/types/error_response.py +0 -26
  49. mixpeek/types/extract_response.py +0 -31
  50. mixpeek/types/field_type.py +0 -5
  51. mixpeek/types/generation_response.py +0 -32
  52. mixpeek/types/html_params.py +0 -25
  53. mixpeek/types/http_validation_error.py +0 -26
  54. mixpeek/types/image_params.py +0 -28
  55. mixpeek/types/message.py +0 -33
  56. mixpeek/types/metadata.py +0 -28
  57. mixpeek/types/modality.py +0 -5
  58. mixpeek/types/model.py +0 -34
  59. mixpeek/types/models.py +0 -5
  60. mixpeek/types/pdf_params.py +0 -37
  61. mixpeek/types/pipeline_response.py +0 -45
  62. mixpeek/types/pipeline_task_response.py +0 -28
  63. mixpeek/types/ppt_params.py +0 -23
  64. mixpeek/types/pptx_params.py +0 -23
  65. mixpeek/types/settings.py +0 -31
  66. mixpeek/types/source.py +0 -39
  67. mixpeek/types/source_destination_mapping.py +0 -40
  68. mixpeek/types/txt_params.py +0 -23
  69. mixpeek/types/user.py +0 -32
  70. mixpeek/types/validation_error.py +0 -28
  71. mixpeek/types/validation_error_loc_item.py +0 -5
  72. mixpeek/types/video_params.py +0 -23
  73. mixpeek/types/workflow_code_response.py +0 -25
  74. mixpeek/types/workflow_response.py +0 -28
  75. mixpeek/types/workflow_settings.py +0 -26
  76. mixpeek/types/xlsx_params.py +0 -25
  77. mixpeek/user/__init__.py +0 -2
  78. mixpeek/user/client.py +0 -312
  79. mixpeek/version.py +0 -4
  80. mixpeek/workflow/__init__.py +0 -2
  81. mixpeek/workflow/client.py +0 -543
  82. mixpeek-0.6.8.dist-info/LICENSE +0 -21
  83. mixpeek-0.6.8.dist-info/METADATA +0 -145
  84. mixpeek-0.6.8.dist-info/RECORD +0 -76
  85. /mixpeek/{py.typed → endpoints/__init__.py} +0 -0
@@ -1,286 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
- import urllib.parse
5
- from json.decoder import JSONDecodeError
6
-
7
- from ...core.api_error import ApiError
8
- from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
- from ...core.jsonable_encoder import jsonable_encoder
10
- from ...core.pydantic_utilities import pydantic_v1
11
- from ...core.remove_none_from_dict import remove_none_from_dict
12
- from ...core.request_options import RequestOptions
13
- from ...errors.bad_request_error import BadRequestError
14
- from ...errors.forbidden_error import ForbiddenError
15
- from ...errors.internal_server_error import InternalServerError
16
- from ...errors.not_found_error import NotFoundError
17
- from ...errors.unauthorized_error import UnauthorizedError
18
- from ...errors.unprocessable_entity_error import UnprocessableEntityError
19
- from ...types.error_response import ErrorResponse
20
- from ...types.http_validation_error import HttpValidationError
21
-
22
-
23
- class SampleClient:
24
- def __init__(self, *, client_wrapper: SyncClientWrapper):
25
- self._client_wrapper = client_wrapper
26
-
27
- def database(self, database_name: str, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Any:
28
- """
29
- Parameters:
30
- - database_name: str.
31
-
32
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
33
- ---
34
- from mixpeek.client import Mixpeek
35
-
36
- client = Mixpeek(
37
- authorization="YOUR_AUTHORIZATION",
38
- index_id="YOUR_INDEX_ID",
39
- api_key="YOUR_API_KEY",
40
- )
41
- client.storage.sample.database(
42
- database_name="database_name",
43
- )
44
- """
45
- _response = self._client_wrapper.httpx_client.request(
46
- "GET",
47
- urllib.parse.urljoin(
48
- f"{self._client_wrapper.get_base_url()}/", f"storage/sample/database/{jsonable_encoder(database_name)}"
49
- ),
50
- params=jsonable_encoder(
51
- request_options.get("additional_query_parameters") if request_options is not None else None
52
- ),
53
- headers=jsonable_encoder(
54
- remove_none_from_dict(
55
- {
56
- **self._client_wrapper.get_headers(),
57
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
58
- }
59
- )
60
- ),
61
- timeout=request_options.get("timeout_in_seconds")
62
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
63
- else self._client_wrapper.get_timeout(),
64
- retries=0,
65
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
66
- )
67
- if 200 <= _response.status_code < 300:
68
- return pydantic_v1.parse_obj_as(typing.Any, _response.json()) # type: ignore
69
- if _response.status_code == 400:
70
- raise BadRequestError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
71
- if _response.status_code == 401:
72
- raise UnauthorizedError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
73
- if _response.status_code == 403:
74
- raise ForbiddenError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
75
- if _response.status_code == 404:
76
- raise NotFoundError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
77
- if _response.status_code == 422:
78
- raise UnprocessableEntityError(
79
- pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
80
- )
81
- if _response.status_code == 500:
82
- raise InternalServerError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
83
- try:
84
- _response_json = _response.json()
85
- except JSONDecodeError:
86
- raise ApiError(status_code=_response.status_code, body=_response.text)
87
- raise ApiError(status_code=_response.status_code, body=_response_json)
88
-
89
- def collection(
90
- self, collection_name: str, *, request_options: typing.Optional[RequestOptions] = None
91
- ) -> typing.Any:
92
- """
93
- Parameters:
94
- - collection_name: str.
95
-
96
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
97
- ---
98
- from mixpeek.client import Mixpeek
99
-
100
- client = Mixpeek(
101
- authorization="YOUR_AUTHORIZATION",
102
- index_id="YOUR_INDEX_ID",
103
- api_key="YOUR_API_KEY",
104
- )
105
- client.storage.sample.collection(
106
- collection_name="collection_name",
107
- )
108
- """
109
- _response = self._client_wrapper.httpx_client.request(
110
- "GET",
111
- urllib.parse.urljoin(
112
- f"{self._client_wrapper.get_base_url()}/",
113
- f"storage/sample/collection/{jsonable_encoder(collection_name)}",
114
- ),
115
- params=jsonable_encoder(
116
- request_options.get("additional_query_parameters") if request_options is not None else None
117
- ),
118
- headers=jsonable_encoder(
119
- remove_none_from_dict(
120
- {
121
- **self._client_wrapper.get_headers(),
122
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
123
- }
124
- )
125
- ),
126
- timeout=request_options.get("timeout_in_seconds")
127
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
128
- else self._client_wrapper.get_timeout(),
129
- retries=0,
130
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
131
- )
132
- if 200 <= _response.status_code < 300:
133
- return pydantic_v1.parse_obj_as(typing.Any, _response.json()) # type: ignore
134
- if _response.status_code == 400:
135
- raise BadRequestError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
136
- if _response.status_code == 401:
137
- raise UnauthorizedError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
138
- if _response.status_code == 403:
139
- raise ForbiddenError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
140
- if _response.status_code == 404:
141
- raise NotFoundError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
142
- if _response.status_code == 422:
143
- raise UnprocessableEntityError(
144
- pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
145
- )
146
- if _response.status_code == 500:
147
- raise InternalServerError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
148
- try:
149
- _response_json = _response.json()
150
- except JSONDecodeError:
151
- raise ApiError(status_code=_response.status_code, body=_response.text)
152
- raise ApiError(status_code=_response.status_code, body=_response_json)
153
-
154
-
155
- class AsyncSampleClient:
156
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
157
- self._client_wrapper = client_wrapper
158
-
159
- async def database(
160
- self, database_name: str, *, request_options: typing.Optional[RequestOptions] = None
161
- ) -> typing.Any:
162
- """
163
- Parameters:
164
- - database_name: str.
165
-
166
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
167
- ---
168
- from mixpeek.client import AsyncMixpeek
169
-
170
- client = AsyncMixpeek(
171
- authorization="YOUR_AUTHORIZATION",
172
- index_id="YOUR_INDEX_ID",
173
- api_key="YOUR_API_KEY",
174
- )
175
- await client.storage.sample.database(
176
- database_name="database_name",
177
- )
178
- """
179
- _response = await self._client_wrapper.httpx_client.request(
180
- "GET",
181
- urllib.parse.urljoin(
182
- f"{self._client_wrapper.get_base_url()}/", f"storage/sample/database/{jsonable_encoder(database_name)}"
183
- ),
184
- params=jsonable_encoder(
185
- request_options.get("additional_query_parameters") if request_options is not None else None
186
- ),
187
- headers=jsonable_encoder(
188
- remove_none_from_dict(
189
- {
190
- **self._client_wrapper.get_headers(),
191
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
192
- }
193
- )
194
- ),
195
- timeout=request_options.get("timeout_in_seconds")
196
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
197
- else self._client_wrapper.get_timeout(),
198
- retries=0,
199
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
200
- )
201
- if 200 <= _response.status_code < 300:
202
- return pydantic_v1.parse_obj_as(typing.Any, _response.json()) # type: ignore
203
- if _response.status_code == 400:
204
- raise BadRequestError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
205
- if _response.status_code == 401:
206
- raise UnauthorizedError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
207
- if _response.status_code == 403:
208
- raise ForbiddenError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
209
- if _response.status_code == 404:
210
- raise NotFoundError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
211
- if _response.status_code == 422:
212
- raise UnprocessableEntityError(
213
- pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
214
- )
215
- if _response.status_code == 500:
216
- raise InternalServerError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
217
- try:
218
- _response_json = _response.json()
219
- except JSONDecodeError:
220
- raise ApiError(status_code=_response.status_code, body=_response.text)
221
- raise ApiError(status_code=_response.status_code, body=_response_json)
222
-
223
- async def collection(
224
- self, collection_name: str, *, request_options: typing.Optional[RequestOptions] = None
225
- ) -> typing.Any:
226
- """
227
- Parameters:
228
- - collection_name: str.
229
-
230
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
231
- ---
232
- from mixpeek.client import AsyncMixpeek
233
-
234
- client = AsyncMixpeek(
235
- authorization="YOUR_AUTHORIZATION",
236
- index_id="YOUR_INDEX_ID",
237
- api_key="YOUR_API_KEY",
238
- )
239
- await client.storage.sample.collection(
240
- collection_name="collection_name",
241
- )
242
- """
243
- _response = await self._client_wrapper.httpx_client.request(
244
- "GET",
245
- urllib.parse.urljoin(
246
- f"{self._client_wrapper.get_base_url()}/",
247
- f"storage/sample/collection/{jsonable_encoder(collection_name)}",
248
- ),
249
- params=jsonable_encoder(
250
- request_options.get("additional_query_parameters") if request_options is not None else None
251
- ),
252
- headers=jsonable_encoder(
253
- remove_none_from_dict(
254
- {
255
- **self._client_wrapper.get_headers(),
256
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
257
- }
258
- )
259
- ),
260
- timeout=request_options.get("timeout_in_seconds")
261
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
262
- else self._client_wrapper.get_timeout(),
263
- retries=0,
264
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
265
- )
266
- if 200 <= _response.status_code < 300:
267
- return pydantic_v1.parse_obj_as(typing.Any, _response.json()) # type: ignore
268
- if _response.status_code == 400:
269
- raise BadRequestError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
270
- if _response.status_code == 401:
271
- raise UnauthorizedError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
272
- if _response.status_code == 403:
273
- raise ForbiddenError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
274
- if _response.status_code == 404:
275
- raise NotFoundError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
276
- if _response.status_code == 422:
277
- raise UnprocessableEntityError(
278
- pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
279
- )
280
- if _response.status_code == 500:
281
- raise InternalServerError(pydantic_v1.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
282
- try:
283
- _response_json = _response.json()
284
- except JSONDecodeError:
285
- raise ApiError(status_code=_response.status_code, body=_response.text)
286
- raise ApiError(status_code=_response.status_code, body=_response_json)
mixpeek/types/__init__.py DELETED
@@ -1,81 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from .api_key import ApiKey
4
- from .audio_params import AudioParams
5
- from .configs_response import ConfigsResponse
6
- from .connection import Connection
7
- from .connection_engine import ConnectionEngine
8
- from .csv_params import CsvParams
9
- from .destination import Destination
10
- from .embedding_response import EmbeddingResponse
11
- from .error_message import ErrorMessage
12
- from .error_response import ErrorResponse
13
- from .extract_response import ExtractResponse
14
- from .field_type import FieldType
15
- from .generation_response import GenerationResponse
16
- from .html_params import HtmlParams
17
- from .http_validation_error import HttpValidationError
18
- from .image_params import ImageParams
19
- from .message import Message
20
- from .metadata import Metadata
21
- from .modality import Modality
22
- from .model import Model
23
- from .models import Models
24
- from .pdf_params import PdfParams
25
- from .pipeline_response import PipelineResponse
26
- from .pipeline_task_response import PipelineTaskResponse
27
- from .ppt_params import PptParams
28
- from .pptx_params import PptxParams
29
- from .settings import Settings
30
- from .source import Source
31
- from .source_destination_mapping import SourceDestinationMapping
32
- from .txt_params import TxtParams
33
- from .user import User
34
- from .validation_error import ValidationError
35
- from .validation_error_loc_item import ValidationErrorLocItem
36
- from .video_params import VideoParams
37
- from .workflow_code_response import WorkflowCodeResponse
38
- from .workflow_response import WorkflowResponse
39
- from .workflow_settings import WorkflowSettings
40
- from .xlsx_params import XlsxParams
41
-
42
- __all__ = [
43
- "ApiKey",
44
- "AudioParams",
45
- "ConfigsResponse",
46
- "Connection",
47
- "ConnectionEngine",
48
- "CsvParams",
49
- "Destination",
50
- "EmbeddingResponse",
51
- "ErrorMessage",
52
- "ErrorResponse",
53
- "ExtractResponse",
54
- "FieldType",
55
- "GenerationResponse",
56
- "HtmlParams",
57
- "HttpValidationError",
58
- "ImageParams",
59
- "Message",
60
- "Metadata",
61
- "Modality",
62
- "Model",
63
- "Models",
64
- "PdfParams",
65
- "PipelineResponse",
66
- "PipelineTaskResponse",
67
- "PptParams",
68
- "PptxParams",
69
- "Settings",
70
- "Source",
71
- "SourceDestinationMapping",
72
- "TxtParams",
73
- "User",
74
- "ValidationError",
75
- "ValidationErrorLocItem",
76
- "VideoParams",
77
- "WorkflowCodeResponse",
78
- "WorkflowResponse",
79
- "WorkflowSettings",
80
- "XlsxParams",
81
- ]
mixpeek/types/api_key.py DELETED
@@ -1,27 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
-
6
- from ..core.datetime_utils import serialize_datetime
7
- from ..core.pydantic_utilities import pydantic_v1
8
-
9
-
10
- class ApiKey(pydantic_v1.BaseModel):
11
- key: typing.Optional[str] = None
12
- name: typing.Optional[str] = None
13
- created_at: typing.Optional[dt.datetime] = None
14
-
15
- def json(self, **kwargs: typing.Any) -> str:
16
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
17
- return super().json(**kwargs_with_defaults)
18
-
19
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
20
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
21
- return super().dict(**kwargs_with_defaults)
22
-
23
- class Config:
24
- frozen = True
25
- smart_union = True
26
- extra = pydantic_v1.Extra.allow
27
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,25 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
-
6
- from ..core.datetime_utils import serialize_datetime
7
- from ..core.pydantic_utilities import pydantic_v1
8
-
9
-
10
- class AudioParams(pydantic_v1.BaseModel):
11
- interval_range: typing.Optional[int] = None
12
-
13
- def json(self, **kwargs: typing.Any) -> str:
14
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
15
- return super().json(**kwargs_with_defaults)
16
-
17
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
18
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
19
- return super().dict(**kwargs_with_defaults)
20
-
21
- class Config:
22
- frozen = True
23
- smart_union = True
24
- extra = pydantic_v1.Extra.allow
25
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,38 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
-
6
- from ..core.datetime_utils import serialize_datetime
7
- from ..core.pydantic_utilities import pydantic_v1
8
-
9
-
10
- class ConfigsResponse(pydantic_v1.BaseModel):
11
- dimensions: int = pydantic_v1.Field()
12
- """
13
- The dimensions of the processed data.
14
- """
15
-
16
- elapsed_time: float = pydantic_v1.Field()
17
- """
18
- The time taken to process the data.
19
- """
20
-
21
- token_size: int = pydantic_v1.Field()
22
- """
23
- The size of the tokens in the processed data.
24
- """
25
-
26
- def json(self, **kwargs: typing.Any) -> str:
27
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
28
- return super().json(**kwargs_with_defaults)
29
-
30
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
31
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
32
- return super().dict(**kwargs_with_defaults)
33
-
34
- class Config:
35
- frozen = True
36
- smart_union = True
37
- extra = pydantic_v1.Extra.allow
38
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,32 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
-
6
- from ..core.datetime_utils import serialize_datetime
7
- from ..core.pydantic_utilities import pydantic_v1
8
- from .connection_engine import ConnectionEngine
9
-
10
-
11
- class Connection(pydantic_v1.BaseModel):
12
- engine: ConnectionEngine
13
- host: str
14
- port: typing.Optional[int] = None
15
- database: str
16
- username: str
17
- password: str
18
- extra_params: typing.Optional[typing.Dict[str, typing.Any]] = None
19
-
20
- def json(self, **kwargs: typing.Any) -> str:
21
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
22
- return super().json(**kwargs_with_defaults)
23
-
24
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
26
- return super().dict(**kwargs_with_defaults)
27
-
28
- class Config:
29
- frozen = True
30
- smart_union = True
31
- extra = pydantic_v1.Extra.allow
32
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- ConnectionEngine = typing.Union[typing.AnyStr, typing.Literal["mongodb", "postgresql"]]
@@ -1,25 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
-
6
- from ..core.datetime_utils import serialize_datetime
7
- from ..core.pydantic_utilities import pydantic_v1
8
-
9
-
10
- class CsvParams(pydantic_v1.BaseModel):
11
- include_header: typing.Optional[bool] = None
12
-
13
- def json(self, **kwargs: typing.Any) -> str:
14
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
15
- return super().json(**kwargs_with_defaults)
16
-
17
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
18
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
19
- return super().dict(**kwargs_with_defaults)
20
-
21
- class Config:
22
- frozen = True
23
- smart_union = True
24
- extra = pydantic_v1.Extra.allow
25
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,38 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
-
6
- from ..core.datetime_utils import serialize_datetime
7
- from ..core.pydantic_utilities import pydantic_v1
8
-
9
-
10
- class Destination(pydantic_v1.BaseModel):
11
- collection: str = pydantic_v1.Field()
12
- """
13
- The collection name
14
- """
15
-
16
- field: str = pydantic_v1.Field()
17
- """
18
- The field name
19
- """
20
-
21
- embedding: str = pydantic_v1.Field()
22
- """
23
- The embedding
24
- """
25
-
26
- def json(self, **kwargs: typing.Any) -> str:
27
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
28
- return super().json(**kwargs_with_defaults)
29
-
30
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
31
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
32
- return super().dict(**kwargs_with_defaults)
33
-
34
- class Config:
35
- frozen = True
36
- smart_union = True
37
- extra = pydantic_v1.Extra.allow
38
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,30 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
-
6
- from ..core.datetime_utils import serialize_datetime
7
- from ..core.pydantic_utilities import pydantic_v1
8
-
9
-
10
- class EmbeddingResponse(pydantic_v1.BaseModel):
11
- embedding: typing.List[float] = pydantic_v1.Field()
12
- """
13
- The embedding of the processed data.
14
- """
15
-
16
- elapsed_time: typing.Optional[float] = None
17
-
18
- def json(self, **kwargs: typing.Any) -> str:
19
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
- return super().json(**kwargs_with_defaults)
21
-
22
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
- return super().dict(**kwargs_with_defaults)
25
-
26
- class Config:
27
- frozen = True
28
- smart_union = True
29
- extra = pydantic_v1.Extra.allow
30
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,25 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
-
6
- from ..core.datetime_utils import serialize_datetime
7
- from ..core.pydantic_utilities import pydantic_v1
8
-
9
-
10
- class ErrorMessage(pydantic_v1.BaseModel):
11
- msg: str
12
-
13
- def json(self, **kwargs: typing.Any) -> str:
14
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
15
- return super().json(**kwargs_with_defaults)
16
-
17
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
18
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
19
- return super().dict(**kwargs_with_defaults)
20
-
21
- class Config:
22
- frozen = True
23
- smart_union = True
24
- extra = pydantic_v1.Extra.allow
25
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,26 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
-
6
- from ..core.datetime_utils import serialize_datetime
7
- from ..core.pydantic_utilities import pydantic_v1
8
- from .error_message import ErrorMessage
9
-
10
-
11
- class ErrorResponse(pydantic_v1.BaseModel):
12
- detail: typing.Optional[typing.List[ErrorMessage]] = None
13
-
14
- def json(self, **kwargs: typing.Any) -> str:
15
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
16
- return super().json(**kwargs_with_defaults)
17
-
18
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
19
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
- return super().dict(**kwargs_with_defaults)
21
-
22
- class Config:
23
- frozen = True
24
- smart_union = True
25
- extra = pydantic_v1.Extra.allow
26
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,31 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
-
6
- from ..core.datetime_utils import serialize_datetime
7
- from ..core.pydantic_utilities import pydantic_v1
8
-
9
-
10
- class ExtractResponse(pydantic_v1.BaseModel):
11
- output: typing.Any
12
- metadata: typing.Dict[str, typing.Any] = pydantic_v1.Field()
13
- """
14
- Metadata related to the extraction process.
15
- """
16
-
17
- elapsed_time: typing.Optional[float] = None
18
-
19
- def json(self, **kwargs: typing.Any) -> str:
20
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
21
- return super().json(**kwargs_with_defaults)
22
-
23
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
- return super().dict(**kwargs_with_defaults)
26
-
27
- class Config:
28
- frozen = True
29
- smart_union = True
30
- extra = pydantic_v1.Extra.allow
31
- json_encoders = {dt.datetime: serialize_datetime}