usecortex-ai 0.2.0__py3-none-any.whl → 0.2.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 (32) hide show
  1. usecortex_ai/__init__.py +2 -0
  2. usecortex_ai/embeddings/client.py +10 -12
  3. usecortex_ai/embeddings/raw_client.py +8 -10
  4. usecortex_ai/sources/client.py +83 -0
  5. usecortex_ai/sources/raw_client.py +259 -0
  6. usecortex_ai/types/__init__.py +2 -0
  7. usecortex_ai/types/app_sources_upload_data.py +1 -1
  8. usecortex_ai/types/batch_upload_data.py +1 -1
  9. usecortex_ai/types/embeddings_create_collection_data.py +2 -2
  10. usecortex_ai/types/embeddings_delete_data.py +2 -2
  11. usecortex_ai/types/embeddings_get_data.py +2 -2
  12. usecortex_ai/types/embeddings_search_data.py +2 -2
  13. usecortex_ai/types/fetch_content_data.py +2 -2
  14. usecortex_ai/types/list_sources_response.py +1 -1
  15. usecortex_ai/types/markdown_upload_request.py +2 -0
  16. usecortex_ai/types/processing_status.py +2 -2
  17. usecortex_ai/types/relations.py +2 -9
  18. usecortex_ai/types/search_chunk.py +5 -4
  19. usecortex_ai/types/single_upload_data.py +1 -1
  20. usecortex_ai/types/source.py +4 -3
  21. usecortex_ai/types/source_content.py +2 -2
  22. usecortex_ai/types/source_model.py +2 -0
  23. usecortex_ai/types/sub_tenant_ids_data.py +23 -0
  24. usecortex_ai/types/tenant_create_data.py +2 -2
  25. usecortex_ai/types/tenant_stats.py +3 -3
  26. usecortex_ai/upload/client.py +114 -53
  27. usecortex_ai/upload/raw_client.py +94 -49
  28. {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.1.dist-info}/METADATA +1 -1
  29. {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.1.dist-info}/RECORD +32 -31
  30. {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.1.dist-info}/WHEEL +0 -0
  31. {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.1.dist-info}/licenses/LICENSE +0 -0
  32. {usecortex_ai-0.2.0.dist-info → usecortex_ai-0.2.1.dist-info}/top_level.txt +0 -0
usecortex_ai/__init__.py CHANGED
@@ -31,6 +31,7 @@ from .types import (
31
31
  Source,
32
32
  SourceContent,
33
33
  SourceModel,
34
+ SubTenantIdsData,
34
35
  TenantCreateData,
35
36
  TenantStats,
36
37
  ValidationError,
@@ -88,6 +89,7 @@ __all__ = [
88
89
  "Source",
89
90
  "SourceContent",
90
91
  "SourceModel",
92
+ "SubTenantIdsData",
91
93
  "TenantCreateData",
92
94
  "TenantStats",
93
95
  "UnauthorizedError",
@@ -84,8 +84,8 @@ class EmbeddingsClient:
84
84
  def search(
85
85
  self,
86
86
  *,
87
- embeddings: typing.Sequence[float],
88
87
  tenant_id: str,
88
+ embeddings: typing.Optional[typing.Sequence[float]] = OMIT,
89
89
  sub_tenant_id: typing.Optional[str] = OMIT,
90
90
  max_chunks: typing.Optional[int] = OMIT,
91
91
  request_options: typing.Optional[RequestOptions] = None,
@@ -109,11 +109,10 @@ class EmbeddingsClient:
109
109
 
110
110
  Parameters
111
111
  ----------
112
- embeddings : typing.Sequence[float]
113
- Single embedding vector for search
114
-
115
112
  tenant_id : str
116
113
 
114
+ embeddings : typing.Optional[typing.Sequence[float]]
115
+
117
116
  sub_tenant_id : typing.Optional[str]
118
117
 
119
118
  max_chunks : typing.Optional[int]
@@ -131,11 +130,11 @@ class EmbeddingsClient:
131
130
  from usecortex-ai import CortexAI
132
131
 
133
132
  client = CortexAI(token="YOUR_TOKEN", )
134
- client.embeddings.search(embeddings=[1.1], tenant_id='tenant_id', )
133
+ client.embeddings.search(tenant_id='tenant_id', )
135
134
  """
136
135
  _response = self._raw_client.search(
137
- embeddings=embeddings,
138
136
  tenant_id=tenant_id,
137
+ embeddings=embeddings,
139
138
  sub_tenant_id=sub_tenant_id,
140
139
  max_chunks=max_chunks,
141
140
  request_options=request_options,
@@ -294,8 +293,8 @@ class AsyncEmbeddingsClient:
294
293
  async def search(
295
294
  self,
296
295
  *,
297
- embeddings: typing.Sequence[float],
298
296
  tenant_id: str,
297
+ embeddings: typing.Optional[typing.Sequence[float]] = OMIT,
299
298
  sub_tenant_id: typing.Optional[str] = OMIT,
300
299
  max_chunks: typing.Optional[int] = OMIT,
301
300
  request_options: typing.Optional[RequestOptions] = None,
@@ -319,11 +318,10 @@ class AsyncEmbeddingsClient:
319
318
 
320
319
  Parameters
321
320
  ----------
322
- embeddings : typing.Sequence[float]
323
- Single embedding vector for search
324
-
325
321
  tenant_id : str
326
322
 
323
+ embeddings : typing.Optional[typing.Sequence[float]]
324
+
327
325
  sub_tenant_id : typing.Optional[str]
328
326
 
329
327
  max_chunks : typing.Optional[int]
@@ -344,12 +342,12 @@ class AsyncEmbeddingsClient:
344
342
 
345
343
  client = AsyncCortexAI(token="YOUR_TOKEN", )
346
344
  async def main() -> None:
347
- await client.embeddings.search(embeddings=[1.1], tenant_id='tenant_id', )
345
+ await client.embeddings.search(tenant_id='tenant_id', )
348
346
  asyncio.run(main())
349
347
  """
350
348
  _response = await self._raw_client.search(
351
- embeddings=embeddings,
352
349
  tenant_id=tenant_id,
350
+ embeddings=embeddings,
353
351
  sub_tenant_id=sub_tenant_id,
354
352
  max_chunks=max_chunks,
355
353
  request_options=request_options,
@@ -178,8 +178,8 @@ class RawEmbeddingsClient:
178
178
  def search(
179
179
  self,
180
180
  *,
181
- embeddings: typing.Sequence[float],
182
181
  tenant_id: str,
182
+ embeddings: typing.Optional[typing.Sequence[float]] = OMIT,
183
183
  sub_tenant_id: typing.Optional[str] = OMIT,
184
184
  max_chunks: typing.Optional[int] = OMIT,
185
185
  request_options: typing.Optional[RequestOptions] = None,
@@ -203,11 +203,10 @@ class RawEmbeddingsClient:
203
203
 
204
204
  Parameters
205
205
  ----------
206
- embeddings : typing.Sequence[float]
207
- Single embedding vector for search
208
-
209
206
  tenant_id : str
210
207
 
208
+ embeddings : typing.Optional[typing.Sequence[float]]
209
+
211
210
  sub_tenant_id : typing.Optional[str]
212
211
 
213
212
  max_chunks : typing.Optional[int]
@@ -224,8 +223,8 @@ class RawEmbeddingsClient:
224
223
  "embeddings/search",
225
224
  method="POST",
226
225
  json={
227
- "embeddings": embeddings,
228
226
  "tenant_id": tenant_id,
227
+ "embeddings": embeddings,
229
228
  "sub_tenant_id": sub_tenant_id,
230
229
  "max_chunks": max_chunks,
231
230
  },
@@ -742,8 +741,8 @@ class AsyncRawEmbeddingsClient:
742
741
  async def search(
743
742
  self,
744
743
  *,
745
- embeddings: typing.Sequence[float],
746
744
  tenant_id: str,
745
+ embeddings: typing.Optional[typing.Sequence[float]] = OMIT,
747
746
  sub_tenant_id: typing.Optional[str] = OMIT,
748
747
  max_chunks: typing.Optional[int] = OMIT,
749
748
  request_options: typing.Optional[RequestOptions] = None,
@@ -767,11 +766,10 @@ class AsyncRawEmbeddingsClient:
767
766
 
768
767
  Parameters
769
768
  ----------
770
- embeddings : typing.Sequence[float]
771
- Single embedding vector for search
772
-
773
769
  tenant_id : str
774
770
 
771
+ embeddings : typing.Optional[typing.Sequence[float]]
772
+
775
773
  sub_tenant_id : typing.Optional[str]
776
774
 
777
775
  max_chunks : typing.Optional[int]
@@ -788,8 +786,8 @@ class AsyncRawEmbeddingsClient:
788
786
  "embeddings/search",
789
787
  method="POST",
790
788
  json={
791
- "embeddings": embeddings,
792
789
  "tenant_id": tenant_id,
790
+ "embeddings": embeddings,
793
791
  "sub_tenant_id": sub_tenant_id,
794
792
  "max_chunks": max_chunks,
795
793
  },
@@ -5,6 +5,7 @@ import typing
5
5
  from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
6
  from ..core.request_options import RequestOptions
7
7
  from ..types.list_sources_response import ListSourcesResponse
8
+ from ..types.sub_tenant_ids_data import SubTenantIdsData
8
9
  from .raw_client import AsyncRawSourcesClient, RawSourcesClient
9
10
 
10
11
  # this is used as the default value for optional parameters
@@ -94,6 +95,45 @@ class SourcesClient:
94
95
  )
95
96
  return _response.data
96
97
 
98
+ def get_sub_tenant_ids(
99
+ self, *, tenant_id: str, request_options: typing.Optional[RequestOptions] = None
100
+ ) -> SubTenantIdsData:
101
+ """
102
+ Get all sub-tenant IDs (tenant IDs) contained within a specific Weaviate collection.
103
+ Fetches the tenant IDs directly from Weaviate using default cluster credentials.
104
+
105
+ Args:
106
+ tenant_id: The tenant ID to fetch sub-tenant IDs for
107
+ api_details: Authentication dependency
108
+
109
+ Returns:
110
+ SubTenantIdsData: Contains collection_name, sub_tenant_ids list, count, and success message
111
+
112
+ Example:
113
+ GET /list/sub_tenant_ids?tenant_id=my_tenant_123
114
+
115
+ Parameters
116
+ ----------
117
+ tenant_id : str
118
+
119
+ request_options : typing.Optional[RequestOptions]
120
+ Request-specific configuration.
121
+
122
+ Returns
123
+ -------
124
+ SubTenantIdsData
125
+ Successful Response
126
+
127
+ Examples
128
+ --------
129
+ from usecortex-ai import CortexAI
130
+
131
+ client = CortexAI(token="YOUR_TOKEN", )
132
+ client.sources.get_sub_tenant_ids(tenant_id='tenant_id', )
133
+ """
134
+ _response = self._raw_client.get_sub_tenant_ids(tenant_id=tenant_id, request_options=request_options)
135
+ return _response.data
136
+
97
137
 
98
138
  class AsyncSourcesClient:
99
139
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -185,3 +225,46 @@ class AsyncSourcesClient:
185
225
  tenant_id=tenant_id, source_ids=source_ids, request_options=request_options
186
226
  )
187
227
  return _response.data
228
+
229
+ async def get_sub_tenant_ids(
230
+ self, *, tenant_id: str, request_options: typing.Optional[RequestOptions] = None
231
+ ) -> SubTenantIdsData:
232
+ """
233
+ Get all sub-tenant IDs (tenant IDs) contained within a specific Weaviate collection.
234
+ Fetches the tenant IDs directly from Weaviate using default cluster credentials.
235
+
236
+ Args:
237
+ tenant_id: The tenant ID to fetch sub-tenant IDs for
238
+ api_details: Authentication dependency
239
+
240
+ Returns:
241
+ SubTenantIdsData: Contains collection_name, sub_tenant_ids list, count, and success message
242
+
243
+ Example:
244
+ GET /list/sub_tenant_ids?tenant_id=my_tenant_123
245
+
246
+ Parameters
247
+ ----------
248
+ tenant_id : str
249
+
250
+ request_options : typing.Optional[RequestOptions]
251
+ Request-specific configuration.
252
+
253
+ Returns
254
+ -------
255
+ SubTenantIdsData
256
+ Successful Response
257
+
258
+ Examples
259
+ --------
260
+ import asyncio
261
+
262
+ from usecortex-ai import AsyncCortexAI
263
+
264
+ client = AsyncCortexAI(token="YOUR_TOKEN", )
265
+ async def main() -> None:
266
+ await client.sources.get_sub_tenant_ids(tenant_id='tenant_id', )
267
+ asyncio.run(main())
268
+ """
269
+ _response = await self._raw_client.get_sub_tenant_ids(tenant_id=tenant_id, request_options=request_options)
270
+ return _response.data
@@ -17,6 +17,7 @@ from ..errors.unauthorized_error import UnauthorizedError
17
17
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
18
18
  from ..types.actual_error_response import ActualErrorResponse
19
19
  from ..types.list_sources_response import ListSourcesResponse
20
+ from ..types.sub_tenant_ids_data import SubTenantIdsData
20
21
 
21
22
  # this is used as the default value for optional parameters
22
23
  OMIT = typing.cast(typing.Any, ...)
@@ -276,6 +277,135 @@ class RawSourcesClient:
276
277
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
277
278
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
278
279
 
280
+ def get_sub_tenant_ids(
281
+ self, *, tenant_id: str, request_options: typing.Optional[RequestOptions] = None
282
+ ) -> HttpResponse[SubTenantIdsData]:
283
+ """
284
+ Get all sub-tenant IDs (tenant IDs) contained within a specific Weaviate collection.
285
+ Fetches the tenant IDs directly from Weaviate using default cluster credentials.
286
+
287
+ Args:
288
+ tenant_id: The tenant ID to fetch sub-tenant IDs for
289
+ api_details: Authentication dependency
290
+
291
+ Returns:
292
+ SubTenantIdsData: Contains collection_name, sub_tenant_ids list, count, and success message
293
+
294
+ Example:
295
+ GET /list/sub_tenant_ids?tenant_id=my_tenant_123
296
+
297
+ Parameters
298
+ ----------
299
+ tenant_id : str
300
+
301
+ request_options : typing.Optional[RequestOptions]
302
+ Request-specific configuration.
303
+
304
+ Returns
305
+ -------
306
+ HttpResponse[SubTenantIdsData]
307
+ Successful Response
308
+ """
309
+ _response = self._client_wrapper.httpx_client.request(
310
+ "list/sub_tenant_ids",
311
+ method="GET",
312
+ params={
313
+ "tenant_id": tenant_id,
314
+ },
315
+ request_options=request_options,
316
+ )
317
+ try:
318
+ if 200 <= _response.status_code < 300:
319
+ _data = typing.cast(
320
+ SubTenantIdsData,
321
+ parse_obj_as(
322
+ type_=SubTenantIdsData, # type: ignore
323
+ object_=_response.json(),
324
+ ),
325
+ )
326
+ return HttpResponse(response=_response, data=_data)
327
+ if _response.status_code == 400:
328
+ raise BadRequestError(
329
+ headers=dict(_response.headers),
330
+ body=typing.cast(
331
+ ActualErrorResponse,
332
+ parse_obj_as(
333
+ type_=ActualErrorResponse, # type: ignore
334
+ object_=_response.json(),
335
+ ),
336
+ ),
337
+ )
338
+ if _response.status_code == 401:
339
+ raise UnauthorizedError(
340
+ headers=dict(_response.headers),
341
+ body=typing.cast(
342
+ ActualErrorResponse,
343
+ parse_obj_as(
344
+ type_=ActualErrorResponse, # type: ignore
345
+ object_=_response.json(),
346
+ ),
347
+ ),
348
+ )
349
+ if _response.status_code == 403:
350
+ raise ForbiddenError(
351
+ headers=dict(_response.headers),
352
+ body=typing.cast(
353
+ ActualErrorResponse,
354
+ parse_obj_as(
355
+ type_=ActualErrorResponse, # type: ignore
356
+ object_=_response.json(),
357
+ ),
358
+ ),
359
+ )
360
+ if _response.status_code == 404:
361
+ raise NotFoundError(
362
+ headers=dict(_response.headers),
363
+ body=typing.cast(
364
+ ActualErrorResponse,
365
+ parse_obj_as(
366
+ type_=ActualErrorResponse, # type: ignore
367
+ object_=_response.json(),
368
+ ),
369
+ ),
370
+ )
371
+ if _response.status_code == 422:
372
+ raise UnprocessableEntityError(
373
+ headers=dict(_response.headers),
374
+ body=typing.cast(
375
+ typing.Optional[typing.Any],
376
+ parse_obj_as(
377
+ type_=typing.Optional[typing.Any], # type: ignore
378
+ object_=_response.json(),
379
+ ),
380
+ ),
381
+ )
382
+ if _response.status_code == 500:
383
+ raise InternalServerError(
384
+ headers=dict(_response.headers),
385
+ body=typing.cast(
386
+ ActualErrorResponse,
387
+ parse_obj_as(
388
+ type_=ActualErrorResponse, # type: ignore
389
+ object_=_response.json(),
390
+ ),
391
+ ),
392
+ )
393
+ if _response.status_code == 503:
394
+ raise ServiceUnavailableError(
395
+ headers=dict(_response.headers),
396
+ body=typing.cast(
397
+ ActualErrorResponse,
398
+ parse_obj_as(
399
+ type_=ActualErrorResponse, # type: ignore
400
+ object_=_response.json(),
401
+ ),
402
+ ),
403
+ )
404
+ _response_json = _response.json()
405
+ except JSONDecodeError:
406
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
407
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
408
+
279
409
 
280
410
  class AsyncRawSourcesClient:
281
411
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -530,3 +660,132 @@ class AsyncRawSourcesClient:
530
660
  except JSONDecodeError:
531
661
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
532
662
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
663
+
664
+ async def get_sub_tenant_ids(
665
+ self, *, tenant_id: str, request_options: typing.Optional[RequestOptions] = None
666
+ ) -> AsyncHttpResponse[SubTenantIdsData]:
667
+ """
668
+ Get all sub-tenant IDs (tenant IDs) contained within a specific Weaviate collection.
669
+ Fetches the tenant IDs directly from Weaviate using default cluster credentials.
670
+
671
+ Args:
672
+ tenant_id: The tenant ID to fetch sub-tenant IDs for
673
+ api_details: Authentication dependency
674
+
675
+ Returns:
676
+ SubTenantIdsData: Contains collection_name, sub_tenant_ids list, count, and success message
677
+
678
+ Example:
679
+ GET /list/sub_tenant_ids?tenant_id=my_tenant_123
680
+
681
+ Parameters
682
+ ----------
683
+ tenant_id : str
684
+
685
+ request_options : typing.Optional[RequestOptions]
686
+ Request-specific configuration.
687
+
688
+ Returns
689
+ -------
690
+ AsyncHttpResponse[SubTenantIdsData]
691
+ Successful Response
692
+ """
693
+ _response = await self._client_wrapper.httpx_client.request(
694
+ "list/sub_tenant_ids",
695
+ method="GET",
696
+ params={
697
+ "tenant_id": tenant_id,
698
+ },
699
+ request_options=request_options,
700
+ )
701
+ try:
702
+ if 200 <= _response.status_code < 300:
703
+ _data = typing.cast(
704
+ SubTenantIdsData,
705
+ parse_obj_as(
706
+ type_=SubTenantIdsData, # type: ignore
707
+ object_=_response.json(),
708
+ ),
709
+ )
710
+ return AsyncHttpResponse(response=_response, data=_data)
711
+ if _response.status_code == 400:
712
+ raise BadRequestError(
713
+ headers=dict(_response.headers),
714
+ body=typing.cast(
715
+ ActualErrorResponse,
716
+ parse_obj_as(
717
+ type_=ActualErrorResponse, # type: ignore
718
+ object_=_response.json(),
719
+ ),
720
+ ),
721
+ )
722
+ if _response.status_code == 401:
723
+ raise UnauthorizedError(
724
+ headers=dict(_response.headers),
725
+ body=typing.cast(
726
+ ActualErrorResponse,
727
+ parse_obj_as(
728
+ type_=ActualErrorResponse, # type: ignore
729
+ object_=_response.json(),
730
+ ),
731
+ ),
732
+ )
733
+ if _response.status_code == 403:
734
+ raise ForbiddenError(
735
+ headers=dict(_response.headers),
736
+ body=typing.cast(
737
+ ActualErrorResponse,
738
+ parse_obj_as(
739
+ type_=ActualErrorResponse, # type: ignore
740
+ object_=_response.json(),
741
+ ),
742
+ ),
743
+ )
744
+ if _response.status_code == 404:
745
+ raise NotFoundError(
746
+ headers=dict(_response.headers),
747
+ body=typing.cast(
748
+ ActualErrorResponse,
749
+ parse_obj_as(
750
+ type_=ActualErrorResponse, # type: ignore
751
+ object_=_response.json(),
752
+ ),
753
+ ),
754
+ )
755
+ if _response.status_code == 422:
756
+ raise UnprocessableEntityError(
757
+ headers=dict(_response.headers),
758
+ body=typing.cast(
759
+ typing.Optional[typing.Any],
760
+ parse_obj_as(
761
+ type_=typing.Optional[typing.Any], # type: ignore
762
+ object_=_response.json(),
763
+ ),
764
+ ),
765
+ )
766
+ if _response.status_code == 500:
767
+ raise InternalServerError(
768
+ headers=dict(_response.headers),
769
+ body=typing.cast(
770
+ ActualErrorResponse,
771
+ parse_obj_as(
772
+ type_=ActualErrorResponse, # type: ignore
773
+ object_=_response.json(),
774
+ ),
775
+ ),
776
+ )
777
+ if _response.status_code == 503:
778
+ raise ServiceUnavailableError(
779
+ headers=dict(_response.headers),
780
+ body=typing.cast(
781
+ ActualErrorResponse,
782
+ parse_obj_as(
783
+ type_=ActualErrorResponse, # type: ignore
784
+ object_=_response.json(),
785
+ ),
786
+ ),
787
+ )
788
+ _response_json = _response.json()
789
+ except JSONDecodeError:
790
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
791
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
@@ -30,6 +30,7 @@ from .single_upload_data import SingleUploadData
30
30
  from .source import Source
31
31
  from .source_content import SourceContent
32
32
  from .source_model import SourceModel
33
+ from .sub_tenant_ids_data import SubTenantIdsData
33
34
  from .tenant_create_data import TenantCreateData
34
35
  from .tenant_stats import TenantStats
35
36
  from .validation_error import ValidationError
@@ -64,6 +65,7 @@ __all__ = [
64
65
  "Source",
65
66
  "SourceContent",
66
67
  "SourceModel",
68
+ "SubTenantIdsData",
67
69
  "TenantCreateData",
68
70
  "TenantStats",
69
71
  "ValidationError",
@@ -8,9 +8,9 @@ from .file_upload_result import FileUploadResult
8
8
 
9
9
 
10
10
  class AppSourcesUploadData(UniversalBaseModel):
11
+ uploaded: typing.List[FileUploadResult]
11
12
  success: typing.Optional[bool] = None
12
13
  message: typing.Optional[str] = None
13
- uploaded: typing.List[FileUploadResult]
14
14
 
15
15
  if IS_PYDANTIC_V2:
16
16
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -8,9 +8,9 @@ from .file_upload_result import FileUploadResult
8
8
 
9
9
 
10
10
  class BatchUploadData(UniversalBaseModel):
11
+ uploaded: typing.List[FileUploadResult]
11
12
  success: typing.Optional[bool] = None
12
13
  message: typing.Optional[str] = None
13
- uploaded: typing.List[FileUploadResult]
14
14
 
15
15
  if IS_PYDANTIC_V2:
16
16
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -7,10 +7,10 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class EmbeddingsCreateCollectionData(UniversalBaseModel):
10
- success: typing.Optional[bool] = None
11
- message: typing.Optional[str] = None
12
10
  tenant_id: str
13
11
  sub_tenant_id: str
12
+ success: typing.Optional[bool] = None
13
+ message: typing.Optional[str] = None
14
14
 
15
15
  if IS_PYDANTIC_V2:
16
16
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -7,10 +7,10 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class EmbeddingsDeleteData(UniversalBaseModel):
10
- success: typing.Optional[bool] = None
11
- message: typing.Optional[str] = None
12
10
  total_deleted: int
13
11
  status: typing.Dict[str, bool]
12
+ success: typing.Optional[bool] = None
13
+ message: typing.Optional[str] = None
14
14
 
15
15
  if IS_PYDANTIC_V2:
16
16
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -7,10 +7,10 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class EmbeddingsGetData(UniversalBaseModel):
10
- success: typing.Optional[bool] = None
11
- message: typing.Optional[str] = None
12
10
  embeddings: typing.Dict[str, typing.List[float]]
13
11
  not_found_chunk_ids: typing.List[str]
12
+ success: typing.Optional[bool] = None
13
+ message: typing.Optional[str] = None
14
14
 
15
15
  if IS_PYDANTIC_V2:
16
16
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -7,10 +7,10 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class EmbeddingsSearchData(UniversalBaseModel):
10
- success: typing.Optional[bool] = None
11
- message: typing.Optional[str] = None
12
10
  chunk_ids: typing.List[str]
13
11
  scores: typing.List[float]
12
+ success: typing.Optional[bool] = None
13
+ message: typing.Optional[str] = None
14
14
 
15
15
  if IS_PYDANTIC_V2:
16
16
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -7,11 +7,11 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class FetchContentData(UniversalBaseModel):
10
- success: typing.Optional[bool] = None
11
- message: typing.Optional[str] = None
12
10
  file_id: str
13
11
  url: str
14
12
  file_content: typing.Optional[str] = None
13
+ success: typing.Optional[bool] = None
14
+ message: typing.Optional[str] = None
15
15
 
16
16
  if IS_PYDANTIC_V2:
17
17
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -8,9 +8,9 @@ from .source import Source
8
8
 
9
9
 
10
10
  class ListSourcesResponse(UniversalBaseModel):
11
+ sources: typing.List[typing.Optional[Source]]
11
12
  success: typing.Optional[bool] = None
12
13
  message: typing.Optional[str] = None
13
- sources: typing.List[typing.Optional[Source]]
14
14
 
15
15
  if IS_PYDANTIC_V2:
16
16
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -4,12 +4,14 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .relations import Relations
7
8
 
8
9
 
9
10
  class MarkdownUploadRequest(UniversalBaseModel):
10
11
  content: str
11
12
  tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
12
13
  document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
14
+ relations: typing.Optional[Relations] = None
13
15
 
14
16
  if IS_PYDANTIC_V2:
15
17
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -7,10 +7,10 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class ProcessingStatus(UniversalBaseModel):
10
- success: typing.Optional[bool] = None
11
- message: typing.Optional[str] = None
12
10
  file_id: str
13
11
  indexing_status: str
12
+ success: typing.Optional[bool] = None
13
+ message: typing.Optional[str] = None
14
14
 
15
15
  if IS_PYDANTIC_V2:
16
16
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2