mixpeek 0.1.0__py3-none-any.whl → 0.6.1__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 (73) hide show
  1. mixpeek/__init__.py +95 -71
  2. mixpeek/base_client.py +128 -0
  3. mixpeek/client.py +65 -0
  4. mixpeek/core/__init__.py +25 -0
  5. mixpeek/core/api_error.py +15 -0
  6. mixpeek/core/client_wrapper.py +83 -0
  7. mixpeek/core/datetime_utils.py +28 -0
  8. mixpeek/core/file.py +38 -0
  9. mixpeek/core/http_client.py +130 -0
  10. mixpeek/core/jsonable_encoder.py +103 -0
  11. mixpeek/core/remove_none_from_dict.py +11 -0
  12. mixpeek/core/request_options.py +32 -0
  13. mixpeek/errors/__init__.py +17 -0
  14. mixpeek/errors/bad_request_error.py +9 -0
  15. mixpeek/errors/forbidden_error.py +9 -0
  16. mixpeek/errors/internal_server_error.py +9 -0
  17. mixpeek/errors/not_found_error.py +9 -0
  18. mixpeek/errors/unauthorized_error.py +9 -0
  19. mixpeek/errors/unprocessable_entity_error.py +9 -0
  20. mixpeek/generators/__init__.py +2 -0
  21. mixpeek/generators/client.py +239 -0
  22. mixpeek/parse/__init__.py +2 -0
  23. mixpeek/parse/client.py +349 -0
  24. mixpeek/parse_client.py +14 -0
  25. mixpeek/pipelines/__init__.py +2 -0
  26. mixpeek/pipelines/client.py +546 -0
  27. mixpeek/py.typed +0 -0
  28. mixpeek/storage/__init__.py +2 -0
  29. mixpeek/storage/client.py +254 -0
  30. mixpeek/types/__init__.py +73 -0
  31. mixpeek/types/audio_params.py +29 -0
  32. mixpeek/types/configs_request.py +31 -0
  33. mixpeek/types/configs_response.py +31 -0
  34. mixpeek/types/connection.py +36 -0
  35. mixpeek/types/connection_engine.py +5 -0
  36. mixpeek/types/csv_params.py +29 -0
  37. mixpeek/types/destination_schema.py +31 -0
  38. mixpeek/types/embedding_request.py +32 -0
  39. mixpeek/types/embedding_response.py +30 -0
  40. mixpeek/types/error_message.py +29 -0
  41. mixpeek/types/error_response.py +30 -0
  42. mixpeek/types/field_schema.py +33 -0
  43. mixpeek/types/field_type.py +5 -0
  44. mixpeek/types/generation_response.py +34 -0
  45. mixpeek/types/html_params.py +29 -0
  46. mixpeek/types/http_validation_error.py +30 -0
  47. mixpeek/types/image_params.py +32 -0
  48. mixpeek/types/message.py +30 -0
  49. mixpeek/types/metadata.py +34 -0
  50. mixpeek/types/modality.py +5 -0
  51. mixpeek/types/model.py +30 -0
  52. mixpeek/types/pdf_params.py +41 -0
  53. mixpeek/types/pipeline_response.py +39 -0
  54. mixpeek/types/ppt_params.py +27 -0
  55. mixpeek/types/pptx_params.py +27 -0
  56. mixpeek/types/settings.py +35 -0
  57. mixpeek/types/source_schema.py +32 -0
  58. mixpeek/types/txt_params.py +27 -0
  59. mixpeek/types/validation_error.py +32 -0
  60. mixpeek/types/validation_error_loc_item.py +5 -0
  61. mixpeek/types/video_params.py +27 -0
  62. mixpeek/types/workflow_response.py +32 -0
  63. mixpeek/types/workflow_settings.py +30 -0
  64. mixpeek/types/xlsx_params.py +29 -0
  65. mixpeek/version.py +4 -0
  66. mixpeek/workflows/__init__.py +2 -0
  67. mixpeek/workflows/client.py +418 -0
  68. mixpeek-0.1.0.dist-info/LICENSE.rst → mixpeek-0.6.1.dist-info/LICENSE +10 -9
  69. mixpeek-0.6.1.dist-info/METADATA +145 -0
  70. mixpeek-0.6.1.dist-info/RECORD +71 -0
  71. {mixpeek-0.1.0.dist-info → mixpeek-0.6.1.dist-info}/WHEEL +1 -1
  72. mixpeek-0.1.0.dist-info/METADATA +0 -211
  73. mixpeek-0.1.0.dist-info/RECORD +0 -5
@@ -0,0 +1,254 @@
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 StorageClient:
28
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
29
+ self._client_wrapper = client_wrapper
30
+
31
+ def test_connection(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Any:
32
+ """
33
+ Parameters:
34
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
35
+ ---
36
+ from mixpeek.client import Mixpeek
37
+
38
+ client = Mixpeek(
39
+ authorization="YOUR_AUTHORIZATION",
40
+ index_id="YOUR_INDEX_ID",
41
+ api_key="YOUR_API_KEY",
42
+ base_url="https://yourhost.com/path/to/api",
43
+ )
44
+ client.storage.test_connection()
45
+ """
46
+ _response = self._client_wrapper.httpx_client.request(
47
+ "GET",
48
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "storage/connect"),
49
+ params=jsonable_encoder(
50
+ request_options.get("additional_query_parameters") if request_options is not None else None
51
+ ),
52
+ headers=jsonable_encoder(
53
+ remove_none_from_dict(
54
+ {
55
+ **self._client_wrapper.get_headers(),
56
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
57
+ }
58
+ )
59
+ ),
60
+ timeout=request_options.get("timeout_in_seconds")
61
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
62
+ else self._client_wrapper.get_timeout(),
63
+ retries=0,
64
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
65
+ )
66
+ if 200 <= _response.status_code < 300:
67
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
68
+ if _response.status_code == 400:
69
+ raise BadRequestError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
70
+ if _response.status_code == 401:
71
+ raise UnauthorizedError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
72
+ if _response.status_code == 403:
73
+ raise ForbiddenError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
74
+ if _response.status_code == 404:
75
+ raise NotFoundError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
76
+ if _response.status_code == 422:
77
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
78
+ if _response.status_code == 500:
79
+ raise InternalServerError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
80
+ try:
81
+ _response_json = _response.json()
82
+ except JSONDecodeError:
83
+ raise ApiError(status_code=_response.status_code, body=_response.text)
84
+ raise ApiError(status_code=_response.status_code, body=_response_json)
85
+
86
+ def sample_database(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Any:
87
+ """
88
+ Parameters:
89
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
90
+ ---
91
+ from mixpeek.client import Mixpeek
92
+
93
+ client = Mixpeek(
94
+ authorization="YOUR_AUTHORIZATION",
95
+ index_id="YOUR_INDEX_ID",
96
+ api_key="YOUR_API_KEY",
97
+ base_url="https://yourhost.com/path/to/api",
98
+ )
99
+ client.storage.sample_database()
100
+ """
101
+ _response = self._client_wrapper.httpx_client.request(
102
+ "GET",
103
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "storage/sample/database"),
104
+ params=jsonable_encoder(
105
+ request_options.get("additional_query_parameters") if request_options is not None else None
106
+ ),
107
+ headers=jsonable_encoder(
108
+ remove_none_from_dict(
109
+ {
110
+ **self._client_wrapper.get_headers(),
111
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
112
+ }
113
+ )
114
+ ),
115
+ timeout=request_options.get("timeout_in_seconds")
116
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
117
+ else self._client_wrapper.get_timeout(),
118
+ retries=0,
119
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
120
+ )
121
+ if 200 <= _response.status_code < 300:
122
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
123
+ if _response.status_code == 400:
124
+ raise BadRequestError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
125
+ if _response.status_code == 401:
126
+ raise UnauthorizedError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
127
+ if _response.status_code == 403:
128
+ raise ForbiddenError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
129
+ if _response.status_code == 404:
130
+ raise NotFoundError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
131
+ if _response.status_code == 422:
132
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
133
+ if _response.status_code == 500:
134
+ raise InternalServerError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
135
+ try:
136
+ _response_json = _response.json()
137
+ except JSONDecodeError:
138
+ raise ApiError(status_code=_response.status_code, body=_response.text)
139
+ raise ApiError(status_code=_response.status_code, body=_response_json)
140
+
141
+
142
+ class AsyncStorageClient:
143
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
144
+ self._client_wrapper = client_wrapper
145
+
146
+ async def test_connection(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Any:
147
+ """
148
+ Parameters:
149
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
150
+ ---
151
+ from mixpeek.client import AsyncMixpeek
152
+
153
+ client = AsyncMixpeek(
154
+ authorization="YOUR_AUTHORIZATION",
155
+ index_id="YOUR_INDEX_ID",
156
+ api_key="YOUR_API_KEY",
157
+ base_url="https://yourhost.com/path/to/api",
158
+ )
159
+ await client.storage.test_connection()
160
+ """
161
+ _response = await self._client_wrapper.httpx_client.request(
162
+ "GET",
163
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "storage/connect"),
164
+ params=jsonable_encoder(
165
+ request_options.get("additional_query_parameters") if request_options is not None else None
166
+ ),
167
+ headers=jsonable_encoder(
168
+ remove_none_from_dict(
169
+ {
170
+ **self._client_wrapper.get_headers(),
171
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
172
+ }
173
+ )
174
+ ),
175
+ timeout=request_options.get("timeout_in_seconds")
176
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
177
+ else self._client_wrapper.get_timeout(),
178
+ retries=0,
179
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
180
+ )
181
+ if 200 <= _response.status_code < 300:
182
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
183
+ if _response.status_code == 400:
184
+ raise BadRequestError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
185
+ if _response.status_code == 401:
186
+ raise UnauthorizedError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
187
+ if _response.status_code == 403:
188
+ raise ForbiddenError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
189
+ if _response.status_code == 404:
190
+ raise NotFoundError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
191
+ if _response.status_code == 422:
192
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
193
+ if _response.status_code == 500:
194
+ raise InternalServerError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
195
+ try:
196
+ _response_json = _response.json()
197
+ except JSONDecodeError:
198
+ raise ApiError(status_code=_response.status_code, body=_response.text)
199
+ raise ApiError(status_code=_response.status_code, body=_response_json)
200
+
201
+ async def sample_database(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Any:
202
+ """
203
+ Parameters:
204
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
205
+ ---
206
+ from mixpeek.client import AsyncMixpeek
207
+
208
+ client = AsyncMixpeek(
209
+ authorization="YOUR_AUTHORIZATION",
210
+ index_id="YOUR_INDEX_ID",
211
+ api_key="YOUR_API_KEY",
212
+ base_url="https://yourhost.com/path/to/api",
213
+ )
214
+ await client.storage.sample_database()
215
+ """
216
+ _response = await self._client_wrapper.httpx_client.request(
217
+ "GET",
218
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "storage/sample/database"),
219
+ params=jsonable_encoder(
220
+ request_options.get("additional_query_parameters") if request_options is not None else None
221
+ ),
222
+ headers=jsonable_encoder(
223
+ remove_none_from_dict(
224
+ {
225
+ **self._client_wrapper.get_headers(),
226
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
227
+ }
228
+ )
229
+ ),
230
+ timeout=request_options.get("timeout_in_seconds")
231
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
232
+ else self._client_wrapper.get_timeout(),
233
+ retries=0,
234
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
235
+ )
236
+ if 200 <= _response.status_code < 300:
237
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
238
+ if _response.status_code == 400:
239
+ raise BadRequestError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
240
+ if _response.status_code == 401:
241
+ raise UnauthorizedError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
242
+ if _response.status_code == 403:
243
+ raise ForbiddenError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
244
+ if _response.status_code == 404:
245
+ raise NotFoundError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
246
+ if _response.status_code == 422:
247
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
248
+ if _response.status_code == 500:
249
+ raise InternalServerError(pydantic.parse_obj_as(ErrorResponse, _response.json())) # type: ignore
250
+ try:
251
+ _response_json = _response.json()
252
+ except JSONDecodeError:
253
+ raise ApiError(status_code=_response.status_code, body=_response.text)
254
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,73 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .audio_params import AudioParams
4
+ from .configs_request import ConfigsRequest
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_schema import DestinationSchema
10
+ from .embedding_request import EmbeddingRequest
11
+ from .embedding_response import EmbeddingResponse
12
+ from .error_message import ErrorMessage
13
+ from .error_response import ErrorResponse
14
+ from .field_schema import FieldSchema
15
+ from .field_type import FieldType
16
+ from .generation_response import GenerationResponse
17
+ from .html_params import HtmlParams
18
+ from .http_validation_error import HttpValidationError
19
+ from .image_params import ImageParams
20
+ from .message import Message
21
+ from .metadata import Metadata
22
+ from .modality import Modality
23
+ from .model import Model
24
+ from .pdf_params import PdfParams
25
+ from .pipeline_response import PipelineResponse
26
+ from .ppt_params import PptParams
27
+ from .pptx_params import PptxParams
28
+ from .settings import Settings
29
+ from .source_schema import SourceSchema
30
+ from .txt_params import TxtParams
31
+ from .validation_error import ValidationError
32
+ from .validation_error_loc_item import ValidationErrorLocItem
33
+ from .video_params import VideoParams
34
+ from .workflow_response import WorkflowResponse
35
+ from .workflow_settings import WorkflowSettings
36
+ from .xlsx_params import XlsxParams
37
+
38
+ __all__ = [
39
+ "AudioParams",
40
+ "ConfigsRequest",
41
+ "ConfigsResponse",
42
+ "Connection",
43
+ "ConnectionEngine",
44
+ "CsvParams",
45
+ "DestinationSchema",
46
+ "EmbeddingRequest",
47
+ "EmbeddingResponse",
48
+ "ErrorMessage",
49
+ "ErrorResponse",
50
+ "FieldSchema",
51
+ "FieldType",
52
+ "GenerationResponse",
53
+ "HtmlParams",
54
+ "HttpValidationError",
55
+ "ImageParams",
56
+ "Message",
57
+ "Metadata",
58
+ "Modality",
59
+ "Model",
60
+ "PdfParams",
61
+ "PipelineResponse",
62
+ "PptParams",
63
+ "PptxParams",
64
+ "Settings",
65
+ "SourceSchema",
66
+ "TxtParams",
67
+ "ValidationError",
68
+ "ValidationErrorLocItem",
69
+ "VideoParams",
70
+ "WorkflowResponse",
71
+ "WorkflowSettings",
72
+ "XlsxParams",
73
+ ]
@@ -0,0 +1,29 @@
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}
@@ -0,0 +1,31 @@
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 .modality import Modality
8
+
9
+ try:
10
+ import pydantic.v1 as pydantic # type: ignore
11
+ except ImportError:
12
+ import pydantic # type: ignore
13
+
14
+
15
+ class ConfigsRequest(pydantic.BaseModel):
16
+ modality: typing.Optional[Modality] = None
17
+ model: typing.Optional[str] = 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}
@@ -0,0 +1,31 @@
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
16
+ elapsed_time: float
17
+ token_size: int
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}
@@ -0,0 +1,36 @@
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: typing.Optional[str] = None
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}
@@ -0,0 +1,5 @@
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"]]
@@ -0,0 +1,29 @@
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}
@@ -0,0 +1,31 @@
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 DestinationSchema(pydantic.BaseModel):
15
+ collection: str
16
+ new_field_name: str
17
+ new_embeddings: str
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}
@@ -0,0 +1,32 @@
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 .modality import Modality
8
+
9
+ try:
10
+ import pydantic.v1 as pydantic # type: ignore
11
+ except ImportError:
12
+ import pydantic # type: ignore
13
+
14
+
15
+ class EmbeddingRequest(pydantic.BaseModel):
16
+ input: str
17
+ modality: typing.Optional[Modality] = None
18
+ model: typing.Optional[str] = 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.Extra.allow
32
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,30 @@
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]
16
+ elapsed_time: float
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}
@@ -0,0 +1,29 @@
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}
@@ -0,0 +1,30 @@
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}