mixpeek 0.6.7__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 (84) 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.7.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 -989
  14. mixpeek/core/__init__.py +0 -25
  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 -103
  21. mixpeek/core/remove_none_from_dict.py +0 -11
  22. mixpeek/core/request_options.py +0 -32
  23. mixpeek/environment.py +0 -7
  24. mixpeek/errors/__init__.py +0 -17
  25. mixpeek/errors/bad_request_error.py +0 -9
  26. mixpeek/errors/forbidden_error.py +0 -9
  27. mixpeek/errors/internal_server_error.py +0 -9
  28. mixpeek/errors/not_found_error.py +0 -9
  29. mixpeek/errors/unauthorized_error.py +0 -9
  30. mixpeek/errors/unprocessable_entity_error.py +0 -9
  31. mixpeek/pipeline/__init__.py +0 -2
  32. mixpeek/pipeline/client.py +0 -474
  33. mixpeek/storage/__init__.py +0 -5
  34. mixpeek/storage/client.py +0 -145
  35. mixpeek/storage/sample/__init__.py +0 -2
  36. mixpeek/storage/sample/client.py +0 -282
  37. mixpeek/types/__init__.py +0 -81
  38. mixpeek/types/api_key.py +0 -31
  39. mixpeek/types/audio_params.py +0 -29
  40. mixpeek/types/configs_response.py +0 -42
  41. mixpeek/types/connection.py +0 -36
  42. mixpeek/types/connection_engine.py +0 -5
  43. mixpeek/types/csv_params.py +0 -29
  44. mixpeek/types/destination.py +0 -42
  45. mixpeek/types/embedding_response.py +0 -34
  46. mixpeek/types/error_message.py +0 -29
  47. mixpeek/types/error_response.py +0 -30
  48. mixpeek/types/extract_response.py +0 -35
  49. mixpeek/types/field_type.py +0 -5
  50. mixpeek/types/generation_response.py +0 -36
  51. mixpeek/types/html_params.py +0 -29
  52. mixpeek/types/http_validation_error.py +0 -30
  53. mixpeek/types/image_params.py +0 -32
  54. mixpeek/types/message.py +0 -37
  55. mixpeek/types/metadata.py +0 -32
  56. mixpeek/types/modality.py +0 -5
  57. mixpeek/types/model.py +0 -38
  58. mixpeek/types/models.py +0 -5
  59. mixpeek/types/pdf_params.py +0 -41
  60. mixpeek/types/pipeline_response.py +0 -49
  61. mixpeek/types/pipeline_task_response.py +0 -32
  62. mixpeek/types/ppt_params.py +0 -27
  63. mixpeek/types/pptx_params.py +0 -27
  64. mixpeek/types/settings.py +0 -35
  65. mixpeek/types/source.py +0 -43
  66. mixpeek/types/source_destination_mapping.py +0 -44
  67. mixpeek/types/txt_params.py +0 -27
  68. mixpeek/types/user.py +0 -36
  69. mixpeek/types/validation_error.py +0 -32
  70. mixpeek/types/validation_error_loc_item.py +0 -5
  71. mixpeek/types/video_params.py +0 -27
  72. mixpeek/types/workflow_code_response.py +0 -29
  73. mixpeek/types/workflow_response.py +0 -32
  74. mixpeek/types/workflow_settings.py +0 -30
  75. mixpeek/types/xlsx_params.py +0 -29
  76. mixpeek/user/__init__.py +0 -2
  77. mixpeek/user/client.py +0 -308
  78. mixpeek/version.py +0 -4
  79. mixpeek/workflow/__init__.py +0 -2
  80. mixpeek/workflow/client.py +0 -535
  81. mixpeek-0.6.7.dist-info/LICENSE +0 -21
  82. mixpeek-0.6.7.dist-info/METADATA +0 -145
  83. mixpeek-0.6.7.dist-info/RECORD +0 -75
  84. /mixpeek/{py.typed → endpoints/__init__.py} +0 -0
@@ -1,282 +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.remove_none_from_dict import remove_none_from_dict
11
- from ...core.request_options import RequestOptions
12
- from ...errors.bad_request_error import BadRequestError
13
- from ...errors.forbidden_error import ForbiddenError
14
- from ...errors.internal_server_error import InternalServerError
15
- from ...errors.not_found_error import NotFoundError
16
- from ...errors.unauthorized_error import UnauthorizedError
17
- from ...errors.unprocessable_entity_error import UnprocessableEntityError
18
- from ...types.error_response import ErrorResponse
19
- from ...types.http_validation_error import HttpValidationError
20
-
21
- try:
22
- import pydantic.v1 as pydantic # type: ignore
23
- except ImportError:
24
- import pydantic # type: ignore
25
-
26
-
27
- class SampleClient:
28
- def __init__(self, *, client_wrapper: SyncClientWrapper):
29
- self._client_wrapper = client_wrapper
30
-
31
- def database(self, database_name: str, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Any:
32
- """
33
- Parameters:
34
- - database_name: str.
35
-
36
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
37
- ---
38
- from mixpeek.client import Mixpeek
39
-
40
- client = Mixpeek(
41
- authorization="YOUR_AUTHORIZATION",
42
- index_id="YOUR_INDEX_ID",
43
- api_key="YOUR_API_KEY",
44
- )
45
- client.storage.sample.database(
46
- database_name="database_name",
47
- )
48
- """
49
- _response = self._client_wrapper.httpx_client.request(
50
- "GET",
51
- urllib.parse.urljoin(
52
- f"{self._client_wrapper.get_base_url()}/", f"storage/sample/database/{jsonable_encoder(database_name)}"
53
- ),
54
- params=jsonable_encoder(
55
- request_options.get("additional_query_parameters") if request_options is not None else None
56
- ),
57
- headers=jsonable_encoder(
58
- remove_none_from_dict(
59
- {
60
- **self._client_wrapper.get_headers(),
61
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
62
- }
63
- )
64
- ),
65
- timeout=request_options.get("timeout_in_seconds")
66
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
67
- else self._client_wrapper.get_timeout(),
68
- retries=0,
69
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
70
- )
71
- if 200 <= _response.status_code < 300:
72
- return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
73
- if _response.status_code == 400:
74
- raise BadRequestError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
75
- if _response.status_code == 401:
76
- raise UnauthorizedError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
77
- if _response.status_code == 403:
78
- raise ForbiddenError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
79
- if _response.status_code == 404:
80
- raise NotFoundError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
81
- if _response.status_code == 422:
82
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
83
- if _response.status_code == 500:
84
- raise InternalServerError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
85
- try:
86
- _response_json = _response.json()
87
- except JSONDecodeError:
88
- raise ApiError(status_code=_response.status_code, body=_response.text)
89
- raise ApiError(status_code=_response.status_code, body=_response_json)
90
-
91
- def collection(
92
- self, collection_name: str, *, request_options: typing.Optional[RequestOptions] = None
93
- ) -> typing.Any:
94
- """
95
- Parameters:
96
- - collection_name: str.
97
-
98
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
99
- ---
100
- from mixpeek.client import Mixpeek
101
-
102
- client = Mixpeek(
103
- authorization="YOUR_AUTHORIZATION",
104
- index_id="YOUR_INDEX_ID",
105
- api_key="YOUR_API_KEY",
106
- )
107
- client.storage.sample.collection(
108
- collection_name="collection_name",
109
- )
110
- """
111
- _response = self._client_wrapper.httpx_client.request(
112
- "GET",
113
- urllib.parse.urljoin(
114
- f"{self._client_wrapper.get_base_url()}/",
115
- f"storage/sample/collection/{jsonable_encoder(collection_name)}",
116
- ),
117
- params=jsonable_encoder(
118
- request_options.get("additional_query_parameters") if request_options is not None else None
119
- ),
120
- headers=jsonable_encoder(
121
- remove_none_from_dict(
122
- {
123
- **self._client_wrapper.get_headers(),
124
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
125
- }
126
- )
127
- ),
128
- timeout=request_options.get("timeout_in_seconds")
129
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
130
- else self._client_wrapper.get_timeout(),
131
- retries=0,
132
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
133
- )
134
- if 200 <= _response.status_code < 300:
135
- return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
136
- if _response.status_code == 400:
137
- raise BadRequestError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
138
- if _response.status_code == 401:
139
- raise UnauthorizedError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
140
- if _response.status_code == 403:
141
- raise ForbiddenError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
142
- if _response.status_code == 404:
143
- raise NotFoundError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
144
- if _response.status_code == 422:
145
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
146
- if _response.status_code == 500:
147
- raise InternalServerError(pydantic.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.parse_obj_as(typing.Any, _response.json()) # type: ignore
203
- if _response.status_code == 400:
204
- raise BadRequestError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
205
- if _response.status_code == 401:
206
- raise UnauthorizedError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
207
- if _response.status_code == 403:
208
- raise ForbiddenError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
209
- if _response.status_code == 404:
210
- raise NotFoundError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
211
- if _response.status_code == 422:
212
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
213
- if _response.status_code == 500:
214
- raise InternalServerError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
215
- try:
216
- _response_json = _response.json()
217
- except JSONDecodeError:
218
- raise ApiError(status_code=_response.status_code, body=_response.text)
219
- raise ApiError(status_code=_response.status_code, body=_response_json)
220
-
221
- async def collection(
222
- self, collection_name: str, *, request_options: typing.Optional[RequestOptions] = None
223
- ) -> typing.Any:
224
- """
225
- Parameters:
226
- - collection_name: str.
227
-
228
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
229
- ---
230
- from mixpeek.client import AsyncMixpeek
231
-
232
- client = AsyncMixpeek(
233
- authorization="YOUR_AUTHORIZATION",
234
- index_id="YOUR_INDEX_ID",
235
- api_key="YOUR_API_KEY",
236
- )
237
- await client.storage.sample.collection(
238
- collection_name="collection_name",
239
- )
240
- """
241
- _response = await self._client_wrapper.httpx_client.request(
242
- "GET",
243
- urllib.parse.urljoin(
244
- f"{self._client_wrapper.get_base_url()}/",
245
- f"storage/sample/collection/{jsonable_encoder(collection_name)}",
246
- ),
247
- params=jsonable_encoder(
248
- request_options.get("additional_query_parameters") if request_options is not None else None
249
- ),
250
- headers=jsonable_encoder(
251
- remove_none_from_dict(
252
- {
253
- **self._client_wrapper.get_headers(),
254
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
255
- }
256
- )
257
- ),
258
- timeout=request_options.get("timeout_in_seconds")
259
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
260
- else self._client_wrapper.get_timeout(),
261
- retries=0,
262
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
263
- )
264
- if 200 <= _response.status_code < 300:
265
- return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
266
- if _response.status_code == 400:
267
- raise BadRequestError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
268
- if _response.status_code == 401:
269
- raise UnauthorizedError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
270
- if _response.status_code == 403:
271
- raise ForbiddenError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
272
- if _response.status_code == 404:
273
- raise NotFoundError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
274
- if _response.status_code == 422:
275
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
276
- if _response.status_code == 500:
277
- raise InternalServerError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
278
- try:
279
- _response_json = _response.json()
280
- except JSONDecodeError:
281
- raise ApiError(status_code=_response.status_code, body=_response.text)
282
- 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,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
-
8
- try:
9
- import pydantic.v1 as pydantic # type: ignore
10
- except ImportError:
11
- import pydantic # type: ignore
12
-
13
-
14
- class ApiKey(pydantic.BaseModel):
15
- key: typing.Optional[str] = None
16
- name: typing.Optional[str] = None
17
- created_at: typing.Optional[dt.datetime] = 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.Extra.allow
31
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,29 +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
-
8
- try:
9
- import pydantic.v1 as pydantic # type: ignore
10
- except ImportError:
11
- import pydantic # type: ignore
12
-
13
-
14
- class AudioParams(pydantic.BaseModel):
15
- interval_range: typing.Optional[int] = None
16
-
17
- def json(self, **kwargs: typing.Any) -> str:
18
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
19
- return super().json(**kwargs_with_defaults)
20
-
21
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
22
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
23
- return super().dict(**kwargs_with_defaults)
24
-
25
- class Config:
26
- frozen = True
27
- smart_union = True
28
- extra = pydantic.Extra.allow
29
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,42 +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
-
8
- try:
9
- import pydantic.v1 as pydantic # type: ignore
10
- except ImportError:
11
- import pydantic # type: ignore
12
-
13
-
14
- class ConfigsResponse(pydantic.BaseModel):
15
- dimensions: int = pydantic.Field()
16
- """
17
- The dimensions of the processed data.
18
- """
19
-
20
- elapsed_time: float = pydantic.Field()
21
- """
22
- The time taken to process the data.
23
- """
24
-
25
- token_size: int = pydantic.Field()
26
- """
27
- The size of the tokens in the processed data.
28
- """
29
-
30
- def json(self, **kwargs: typing.Any) -> str:
31
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
32
- return super().json(**kwargs_with_defaults)
33
-
34
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
35
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
36
- return super().dict(**kwargs_with_defaults)
37
-
38
- class Config:
39
- frozen = True
40
- smart_union = True
41
- extra = pydantic.Extra.allow
42
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,36 +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 .connection_engine import ConnectionEngine
8
-
9
- try:
10
- import pydantic.v1 as pydantic # type: ignore
11
- except ImportError:
12
- import pydantic # type: ignore
13
-
14
-
15
- class Connection(pydantic.BaseModel):
16
- engine: ConnectionEngine
17
- host: str
18
- port: typing.Optional[int] = None
19
- database: str
20
- username: str
21
- password: str
22
- extra_params: typing.Optional[typing.Dict[str, typing.Any]] = None
23
-
24
- def json(self, **kwargs: typing.Any) -> str:
25
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
26
- return super().json(**kwargs_with_defaults)
27
-
28
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
29
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
30
- return super().dict(**kwargs_with_defaults)
31
-
32
- class Config:
33
- frozen = True
34
- smart_union = True
35
- extra = pydantic.Extra.allow
36
- 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,29 +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
-
8
- try:
9
- import pydantic.v1 as pydantic # type: ignore
10
- except ImportError:
11
- import pydantic # type: ignore
12
-
13
-
14
- class CsvParams(pydantic.BaseModel):
15
- include_header: typing.Optional[bool] = None
16
-
17
- def json(self, **kwargs: typing.Any) -> str:
18
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
19
- return super().json(**kwargs_with_defaults)
20
-
21
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
22
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
23
- return super().dict(**kwargs_with_defaults)
24
-
25
- class Config:
26
- frozen = True
27
- smart_union = True
28
- extra = pydantic.Extra.allow
29
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,42 +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
-
8
- try:
9
- import pydantic.v1 as pydantic # type: ignore
10
- except ImportError:
11
- import pydantic # type: ignore
12
-
13
-
14
- class Destination(pydantic.BaseModel):
15
- collection: str = pydantic.Field()
16
- """
17
- The collection name
18
- """
19
-
20
- field: str = pydantic.Field()
21
- """
22
- The field name
23
- """
24
-
25
- embedding: str = pydantic.Field()
26
- """
27
- The embedding
28
- """
29
-
30
- def json(self, **kwargs: typing.Any) -> str:
31
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
32
- return super().json(**kwargs_with_defaults)
33
-
34
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
35
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
36
- return super().dict(**kwargs_with_defaults)
37
-
38
- class Config:
39
- frozen = True
40
- smart_union = True
41
- extra = pydantic.Extra.allow
42
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,34 +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
-
8
- try:
9
- import pydantic.v1 as pydantic # type: ignore
10
- except ImportError:
11
- import pydantic # type: ignore
12
-
13
-
14
- class EmbeddingResponse(pydantic.BaseModel):
15
- embedding: typing.List[float] = pydantic.Field()
16
- """
17
- The embedding of the processed data.
18
- """
19
-
20
- elapsed_time: typing.Optional[float] = None
21
-
22
- def json(self, **kwargs: typing.Any) -> str:
23
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
- return super().json(**kwargs_with_defaults)
25
-
26
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
28
- return super().dict(**kwargs_with_defaults)
29
-
30
- class Config:
31
- frozen = True
32
- smart_union = True
33
- extra = pydantic.Extra.allow
34
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,29 +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
-
8
- try:
9
- import pydantic.v1 as pydantic # type: ignore
10
- except ImportError:
11
- import pydantic # type: ignore
12
-
13
-
14
- class ErrorMessage(pydantic.BaseModel):
15
- msg: str
16
-
17
- def json(self, **kwargs: typing.Any) -> str:
18
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
19
- return super().json(**kwargs_with_defaults)
20
-
21
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
22
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
23
- return super().dict(**kwargs_with_defaults)
24
-
25
- class Config:
26
- frozen = True
27
- smart_union = True
28
- extra = pydantic.Extra.allow
29
- 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 .error_message import ErrorMessage
8
-
9
- try:
10
- import pydantic.v1 as pydantic # type: ignore
11
- except ImportError:
12
- import pydantic # type: ignore
13
-
14
-
15
- class ErrorResponse(pydantic.BaseModel):
16
- detail: typing.Optional[typing.List[ErrorMessage]] = 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.Extra.allow
30
- json_encoders = {dt.datetime: serialize_datetime}