llama-cloud 0.0.10__py3-none-any.whl → 0.0.12__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.

Potentially problematic release.


This version of llama-cloud might be problematic. Click here for more details.

Files changed (57) hide show
  1. llama_cloud/__init__.py +82 -6
  2. llama_cloud/client.py +3 -0
  3. llama_cloud/resources/__init__.py +13 -2
  4. llama_cloud/resources/auth/__init__.py +2 -0
  5. llama_cloud/resources/auth/client.py +124 -0
  6. llama_cloud/resources/data_sinks/types/data_sink_update_component_one.py +4 -0
  7. llama_cloud/resources/extraction/__init__.py +2 -2
  8. llama_cloud/resources/extraction/client.py +139 -48
  9. llama_cloud/resources/extraction/types/__init__.py +2 -1
  10. llama_cloud/resources/extraction/types/extraction_schema_create_data_schema_value.py +7 -0
  11. llama_cloud/resources/pipelines/__init__.py +12 -2
  12. llama_cloud/resources/pipelines/client.py +58 -2
  13. llama_cloud/resources/pipelines/types/__init__.py +11 -1
  14. llama_cloud/resources/pipelines/types/pipeline_update_transform_config.py +31 -0
  15. llama_cloud/types/__init__.py +78 -6
  16. llama_cloud/types/advanced_mode_transform_config.py +38 -0
  17. llama_cloud/types/advanced_mode_transform_config_chunking_config.py +67 -0
  18. llama_cloud/types/advanced_mode_transform_config_segmentation_config.py +45 -0
  19. llama_cloud/types/auto_transform_config.py +32 -0
  20. llama_cloud/types/character_chunking_config.py +32 -0
  21. llama_cloud/types/{html_node_parser.py → character_splitter.py} +9 -9
  22. llama_cloud/types/chat_data.py +2 -0
  23. llama_cloud/types/cloud_az_storage_blob_data_source.py +11 -2
  24. llama_cloud/types/{simple_file_node_parser.py → cloud_milvus_vector_store.py} +7 -14
  25. llama_cloud/types/cloud_mongo_db_atlas_vector_search.py +51 -0
  26. llama_cloud/types/configurable_data_sink_names.py +8 -0
  27. llama_cloud/types/configurable_transformation_names.py +8 -12
  28. llama_cloud/types/configured_transformation_item_component_one.py +4 -6
  29. llama_cloud/types/custom_claims.py +61 -0
  30. llama_cloud/types/data_sink_component_one.py +4 -0
  31. llama_cloud/types/data_sink_create_component_one.py +4 -0
  32. llama_cloud/types/element_segmentation_config.py +29 -0
  33. llama_cloud/types/embedding_config.py +36 -0
  34. llama_cloud/types/embedding_config_component.py +7 -0
  35. llama_cloud/types/embedding_config_component_one.py +19 -0
  36. llama_cloud/types/embedding_config_type.py +41 -0
  37. llama_cloud/types/eval_dataset_job_record.py +1 -0
  38. llama_cloud/types/ingestion_error_response.py +34 -0
  39. llama_cloud/types/job_name_mapping.py +45 -0
  40. llama_cloud/types/llama_parse_supported_file_extensions.py +32 -0
  41. llama_cloud/types/llm_parameters.py +39 -0
  42. llama_cloud/types/managed_ingestion_status_response.py +6 -0
  43. llama_cloud/types/none_chunking_config.py +29 -0
  44. llama_cloud/types/none_segmentation_config.py +29 -0
  45. llama_cloud/types/page_segmentation_config.py +29 -0
  46. llama_cloud/types/{json_node_parser.py → page_splitter_node_parser.py} +3 -8
  47. llama_cloud/types/parsing_job.py +2 -0
  48. llama_cloud/types/pipeline_create.py +8 -0
  49. llama_cloud/types/pipeline_create_transform_config.py +31 -0
  50. llama_cloud/types/semantic_chunking_config.py +32 -0
  51. llama_cloud/types/sentence_chunking_config.py +34 -0
  52. llama_cloud/types/token_chunking_config.py +33 -0
  53. llama_cloud/types/user.py +35 -0
  54. {llama_cloud-0.0.10.dist-info → llama_cloud-0.0.12.dist-info}/METADATA +1 -1
  55. {llama_cloud-0.0.10.dist-info → llama_cloud-0.0.12.dist-info}/RECORD +57 -30
  56. {llama_cloud-0.0.10.dist-info → llama_cloud-0.0.12.dist-info}/LICENSE +0 -0
  57. {llama_cloud-0.0.10.dist-info → llama_cloud-0.0.12.dist-info}/WHEEL +0 -0
@@ -13,6 +13,7 @@ from ...types.extraction_job import ExtractionJob
13
13
  from ...types.extraction_result import ExtractionResult
14
14
  from ...types.extraction_schema import ExtractionSchema
15
15
  from ...types.http_validation_error import HttpValidationError
16
+ from .types.extraction_schema_create_data_schema_value import ExtractionSchemaCreateDataSchemaValue
16
17
  from .types.extraction_schema_update_data_schema_value import ExtractionSchemaUpdateDataSchemaValue
17
18
 
18
19
  try:
@@ -31,47 +32,66 @@ class ExtractionClient:
31
32
  def __init__(self, *, client_wrapper: SyncClientWrapper):
32
33
  self._client_wrapper = client_wrapper
33
34
 
34
- def infer_schema(
35
+ def list_schemas(self, *, project_id: typing.Optional[str] = None) -> typing.List[ExtractionSchema]:
36
+ """
37
+ Parameters:
38
+ - project_id: typing.Optional[str].
39
+ ---
40
+ from llama_cloud.client import LlamaCloud
41
+
42
+ client = LlamaCloud(
43
+ token="YOUR_TOKEN",
44
+ )
45
+ client.extraction.list_schemas()
46
+ """
47
+ _response = self._client_wrapper.httpx_client.request(
48
+ "GET",
49
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/extraction/schemas"),
50
+ params=remove_none_from_dict({"project_id": project_id}),
51
+ headers=self._client_wrapper.get_headers(),
52
+ timeout=60,
53
+ )
54
+ if 200 <= _response.status_code < 300:
55
+ return pydantic.parse_obj_as(typing.List[ExtractionSchema], _response.json()) # type: ignore
56
+ if _response.status_code == 422:
57
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
58
+ try:
59
+ _response_json = _response.json()
60
+ except JSONDecodeError:
61
+ raise ApiError(status_code=_response.status_code, body=_response.text)
62
+ raise ApiError(status_code=_response.status_code, body=_response_json)
63
+
64
+ def create_schema(
35
65
  self,
36
66
  *,
37
- schema_id: typing.Optional[str] = OMIT,
38
67
  name: str,
39
68
  project_id: typing.Optional[str] = OMIT,
40
- file_ids: typing.List[str],
41
- stream: typing.Optional[bool] = OMIT,
69
+ data_schema: typing.Dict[str, ExtractionSchemaCreateDataSchemaValue],
42
70
  ) -> ExtractionSchema:
43
71
  """
44
72
  Parameters:
45
- - schema_id: typing.Optional[str]. The ID of a schema to update with the new schema
46
-
47
73
  - name: str. The name of the extraction schema
48
74
 
49
75
  - project_id: typing.Optional[str]. The ID of the project that the extraction schema belongs to
50
76
 
51
- - file_ids: typing.List[str]. The IDs of the files that the extraction schema contains
52
-
53
- - stream: typing.Optional[bool]. Whether to stream the results of the extraction schema
77
+ - data_schema: typing.Dict[str, ExtractionSchemaCreateDataSchemaValue]. The schema of the data
54
78
  ---
55
79
  from llama_cloud.client import LlamaCloud
56
80
 
57
81
  client = LlamaCloud(
58
82
  token="YOUR_TOKEN",
59
83
  )
60
- client.extraction.infer_schema(
84
+ client.extraction.create_schema(
61
85
  name="string",
62
- file_ids=[],
86
+ data_schema={},
63
87
  )
64
88
  """
65
- _request: typing.Dict[str, typing.Any] = {"name": name, "file_ids": file_ids}
66
- if schema_id is not OMIT:
67
- _request["schema_id"] = schema_id
89
+ _request: typing.Dict[str, typing.Any] = {"name": name, "data_schema": data_schema}
68
90
  if project_id is not OMIT:
69
91
  _request["project_id"] = project_id
70
- if stream is not OMIT:
71
- _request["stream"] = stream
72
92
  _response = self._client_wrapper.httpx_client.request(
73
93
  "POST",
74
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/extraction/schemas/infer"),
94
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/extraction/schemas"),
75
95
  json=jsonable_encoder(_request),
76
96
  headers=self._client_wrapper.get_headers(),
77
97
  timeout=60,
@@ -86,27 +106,53 @@ class ExtractionClient:
86
106
  raise ApiError(status_code=_response.status_code, body=_response.text)
87
107
  raise ApiError(status_code=_response.status_code, body=_response_json)
88
108
 
89
- def list_schemas(self, *, project_id: typing.Optional[str] = None) -> typing.List[ExtractionSchema]:
109
+ def infer_schema(
110
+ self,
111
+ *,
112
+ schema_id: typing.Optional[str] = OMIT,
113
+ name: str,
114
+ project_id: typing.Optional[str] = OMIT,
115
+ file_ids: typing.List[str],
116
+ stream: typing.Optional[bool] = OMIT,
117
+ ) -> ExtractionSchema:
90
118
  """
91
119
  Parameters:
92
- - project_id: typing.Optional[str].
120
+ - schema_id: typing.Optional[str]. The ID of a schema to update with the new schema
121
+
122
+ - name: str. The name of the extraction schema
123
+
124
+ - project_id: typing.Optional[str]. The ID of the project that the extraction schema belongs to
125
+
126
+ - file_ids: typing.List[str]. The IDs of the files that the extraction schema contains
127
+
128
+ - stream: typing.Optional[bool]. Whether to stream the results of the extraction schema
93
129
  ---
94
130
  from llama_cloud.client import LlamaCloud
95
131
 
96
132
  client = LlamaCloud(
97
133
  token="YOUR_TOKEN",
98
134
  )
99
- client.extraction.list_schemas()
135
+ client.extraction.infer_schema(
136
+ name="string",
137
+ file_ids=[],
138
+ )
100
139
  """
140
+ _request: typing.Dict[str, typing.Any] = {"name": name, "file_ids": file_ids}
141
+ if schema_id is not OMIT:
142
+ _request["schema_id"] = schema_id
143
+ if project_id is not OMIT:
144
+ _request["project_id"] = project_id
145
+ if stream is not OMIT:
146
+ _request["stream"] = stream
101
147
  _response = self._client_wrapper.httpx_client.request(
102
- "GET",
103
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/extraction/schemas"),
104
- params=remove_none_from_dict({"project_id": project_id}),
148
+ "POST",
149
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/extraction/schemas/infer"),
150
+ json=jsonable_encoder(_request),
105
151
  headers=self._client_wrapper.get_headers(),
106
152
  timeout=60,
107
153
  )
108
154
  if 200 <= _response.status_code < 300:
109
- return pydantic.parse_obj_as(typing.List[ExtractionSchema], _response.json()) # type: ignore
155
+ return pydantic.parse_obj_as(ExtractionSchema, _response.json()) # type: ignore
110
156
  if _response.status_code == 422:
111
157
  raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
112
158
  try:
@@ -350,47 +396,66 @@ class AsyncExtractionClient:
350
396
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
351
397
  self._client_wrapper = client_wrapper
352
398
 
353
- async def infer_schema(
399
+ async def list_schemas(self, *, project_id: typing.Optional[str] = None) -> typing.List[ExtractionSchema]:
400
+ """
401
+ Parameters:
402
+ - project_id: typing.Optional[str].
403
+ ---
404
+ from llama_cloud.client import AsyncLlamaCloud
405
+
406
+ client = AsyncLlamaCloud(
407
+ token="YOUR_TOKEN",
408
+ )
409
+ await client.extraction.list_schemas()
410
+ """
411
+ _response = await self._client_wrapper.httpx_client.request(
412
+ "GET",
413
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/extraction/schemas"),
414
+ params=remove_none_from_dict({"project_id": project_id}),
415
+ headers=self._client_wrapper.get_headers(),
416
+ timeout=60,
417
+ )
418
+ if 200 <= _response.status_code < 300:
419
+ return pydantic.parse_obj_as(typing.List[ExtractionSchema], _response.json()) # type: ignore
420
+ if _response.status_code == 422:
421
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
422
+ try:
423
+ _response_json = _response.json()
424
+ except JSONDecodeError:
425
+ raise ApiError(status_code=_response.status_code, body=_response.text)
426
+ raise ApiError(status_code=_response.status_code, body=_response_json)
427
+
428
+ async def create_schema(
354
429
  self,
355
430
  *,
356
- schema_id: typing.Optional[str] = OMIT,
357
431
  name: str,
358
432
  project_id: typing.Optional[str] = OMIT,
359
- file_ids: typing.List[str],
360
- stream: typing.Optional[bool] = OMIT,
433
+ data_schema: typing.Dict[str, ExtractionSchemaCreateDataSchemaValue],
361
434
  ) -> ExtractionSchema:
362
435
  """
363
436
  Parameters:
364
- - schema_id: typing.Optional[str]. The ID of a schema to update with the new schema
365
-
366
437
  - name: str. The name of the extraction schema
367
438
 
368
439
  - project_id: typing.Optional[str]. The ID of the project that the extraction schema belongs to
369
440
 
370
- - file_ids: typing.List[str]. The IDs of the files that the extraction schema contains
371
-
372
- - stream: typing.Optional[bool]. Whether to stream the results of the extraction schema
441
+ - data_schema: typing.Dict[str, ExtractionSchemaCreateDataSchemaValue]. The schema of the data
373
442
  ---
374
443
  from llama_cloud.client import AsyncLlamaCloud
375
444
 
376
445
  client = AsyncLlamaCloud(
377
446
  token="YOUR_TOKEN",
378
447
  )
379
- await client.extraction.infer_schema(
448
+ await client.extraction.create_schema(
380
449
  name="string",
381
- file_ids=[],
450
+ data_schema={},
382
451
  )
383
452
  """
384
- _request: typing.Dict[str, typing.Any] = {"name": name, "file_ids": file_ids}
385
- if schema_id is not OMIT:
386
- _request["schema_id"] = schema_id
453
+ _request: typing.Dict[str, typing.Any] = {"name": name, "data_schema": data_schema}
387
454
  if project_id is not OMIT:
388
455
  _request["project_id"] = project_id
389
- if stream is not OMIT:
390
- _request["stream"] = stream
391
456
  _response = await self._client_wrapper.httpx_client.request(
392
457
  "POST",
393
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/extraction/schemas/infer"),
458
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/extraction/schemas"),
394
459
  json=jsonable_encoder(_request),
395
460
  headers=self._client_wrapper.get_headers(),
396
461
  timeout=60,
@@ -405,27 +470,53 @@ class AsyncExtractionClient:
405
470
  raise ApiError(status_code=_response.status_code, body=_response.text)
406
471
  raise ApiError(status_code=_response.status_code, body=_response_json)
407
472
 
408
- async def list_schemas(self, *, project_id: typing.Optional[str] = None) -> typing.List[ExtractionSchema]:
473
+ async def infer_schema(
474
+ self,
475
+ *,
476
+ schema_id: typing.Optional[str] = OMIT,
477
+ name: str,
478
+ project_id: typing.Optional[str] = OMIT,
479
+ file_ids: typing.List[str],
480
+ stream: typing.Optional[bool] = OMIT,
481
+ ) -> ExtractionSchema:
409
482
  """
410
483
  Parameters:
411
- - project_id: typing.Optional[str].
484
+ - schema_id: typing.Optional[str]. The ID of a schema to update with the new schema
485
+
486
+ - name: str. The name of the extraction schema
487
+
488
+ - project_id: typing.Optional[str]. The ID of the project that the extraction schema belongs to
489
+
490
+ - file_ids: typing.List[str]. The IDs of the files that the extraction schema contains
491
+
492
+ - stream: typing.Optional[bool]. Whether to stream the results of the extraction schema
412
493
  ---
413
494
  from llama_cloud.client import AsyncLlamaCloud
414
495
 
415
496
  client = AsyncLlamaCloud(
416
497
  token="YOUR_TOKEN",
417
498
  )
418
- await client.extraction.list_schemas()
499
+ await client.extraction.infer_schema(
500
+ name="string",
501
+ file_ids=[],
502
+ )
419
503
  """
504
+ _request: typing.Dict[str, typing.Any] = {"name": name, "file_ids": file_ids}
505
+ if schema_id is not OMIT:
506
+ _request["schema_id"] = schema_id
507
+ if project_id is not OMIT:
508
+ _request["project_id"] = project_id
509
+ if stream is not OMIT:
510
+ _request["stream"] = stream
420
511
  _response = await self._client_wrapper.httpx_client.request(
421
- "GET",
422
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/extraction/schemas"),
423
- params=remove_none_from_dict({"project_id": project_id}),
512
+ "POST",
513
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/extraction/schemas/infer"),
514
+ json=jsonable_encoder(_request),
424
515
  headers=self._client_wrapper.get_headers(),
425
516
  timeout=60,
426
517
  )
427
518
  if 200 <= _response.status_code < 300:
428
- return pydantic.parse_obj_as(typing.List[ExtractionSchema], _response.json()) # type: ignore
519
+ return pydantic.parse_obj_as(ExtractionSchema, _response.json()) # type: ignore
429
520
  if _response.status_code == 422:
430
521
  raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
431
522
  try:
@@ -1,5 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from .extraction_schema_create_data_schema_value import ExtractionSchemaCreateDataSchemaValue
3
4
  from .extraction_schema_update_data_schema_value import ExtractionSchemaUpdateDataSchemaValue
4
5
 
5
- __all__ = ["ExtractionSchemaUpdateDataSchemaValue"]
6
+ __all__ = ["ExtractionSchemaCreateDataSchemaValue", "ExtractionSchemaUpdateDataSchemaValue"]
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ ExtractionSchemaCreateDataSchemaValue = typing.Union[
6
+ typing.Dict[str, typing.Any], typing.List[typing.Any], str, int, float, bool
7
+ ]
@@ -1,5 +1,15 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from .types import PipelineFileUpdateCustomMetadataValue
3
+ from .types import (
4
+ PipelineFileUpdateCustomMetadataValue,
5
+ PipelineUpdateTransformConfig,
6
+ PipelineUpdateTransformConfig_Advanced,
7
+ PipelineUpdateTransformConfig_Auto,
8
+ )
4
9
 
5
- __all__ = ["PipelineFileUpdateCustomMetadataValue"]
10
+ __all__ = [
11
+ "PipelineFileUpdateCustomMetadataValue",
12
+ "PipelineUpdateTransformConfig",
13
+ "PipelineUpdateTransformConfig_Advanced",
14
+ "PipelineUpdateTransformConfig_Auto",
15
+ ]
@@ -15,6 +15,7 @@ from ...types.cloud_document import CloudDocument
15
15
  from ...types.cloud_document_create import CloudDocumentCreate
16
16
  from ...types.configured_transformation_item import ConfiguredTransformationItem
17
17
  from ...types.data_sink_create import DataSinkCreate
18
+ from ...types.embedding_config import EmbeddingConfig
18
19
  from ...types.eval_dataset_job_record import EvalDatasetJobRecord
19
20
  from ...types.eval_execution_params import EvalExecutionParams
20
21
  from ...types.eval_execution_params_override import EvalExecutionParamsOverride
@@ -36,6 +37,7 @@ from ...types.retrieval_mode import RetrievalMode
36
37
  from ...types.retrieve_results import RetrieveResults
37
38
  from ...types.text_node import TextNode
38
39
  from .types.pipeline_file_update_custom_metadata_value import PipelineFileUpdateCustomMetadataValue
40
+ from .types.pipeline_update_transform_config import PipelineUpdateTransformConfig
39
41
 
40
42
  try:
41
43
  import pydantic
@@ -119,6 +121,8 @@ class PipelinesClient:
119
121
  from llama_cloud import (
120
122
  ConfigurableDataSinkNames,
121
123
  DataSinkCreate,
124
+ EmbeddingConfig,
125
+ EmbeddingConfigType,
122
126
  EvalExecutionParams,
123
127
  FilterCondition,
124
128
  LlamaParseParameters,
@@ -136,6 +140,9 @@ class PipelinesClient:
136
140
  )
137
141
  client.pipelines.create_pipeline(
138
142
  request=PipelineCreate(
143
+ embedding_config=EmbeddingConfig(
144
+ type=EmbeddingConfigType.OPENAI_EMBEDDING,
145
+ ),
139
146
  data_sink=DataSinkCreate(
140
147
  name="string",
141
148
  sink_type=ConfigurableDataSinkNames.CHROMA,
@@ -187,6 +194,8 @@ class PipelinesClient:
187
194
  from llama_cloud import (
188
195
  ConfigurableDataSinkNames,
189
196
  DataSinkCreate,
197
+ EmbeddingConfig,
198
+ EmbeddingConfigType,
190
199
  EvalExecutionParams,
191
200
  FilterCondition,
192
201
  LlamaParseParameters,
@@ -204,6 +213,9 @@ class PipelinesClient:
204
213
  )
205
214
  client.pipelines.upsert_pipeline(
206
215
  request=PipelineCreate(
216
+ embedding_config=EmbeddingConfig(
217
+ type=EmbeddingConfigType.OPENAI_EMBEDDING,
218
+ ),
207
219
  data_sink=DataSinkCreate(
208
220
  name="string",
209
221
  sink_type=ConfigurableDataSinkNames.CHROMA,
@@ -278,6 +290,8 @@ class PipelinesClient:
278
290
  self,
279
291
  pipeline_id: str,
280
292
  *,
293
+ embedding_config: typing.Optional[EmbeddingConfig] = OMIT,
294
+ transform_config: typing.Optional[PipelineUpdateTransformConfig] = OMIT,
281
295
  configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]] = OMIT,
282
296
  data_sink_id: typing.Optional[str] = OMIT,
283
297
  data_sink: typing.Optional[DataSinkCreate] = OMIT,
@@ -293,7 +307,11 @@ class PipelinesClient:
293
307
  Parameters:
294
308
  - pipeline_id: str.
295
309
 
296
- - configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]].
310
+ - embedding_config: typing.Optional[EmbeddingConfig]. Configuration for the embedding model.
311
+
312
+ - transform_config: typing.Optional[PipelineUpdateTransformConfig]. Configuration for the transformation.
313
+
314
+ - configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]]. List of configured transformations.
297
315
 
298
316
  - data_sink_id: typing.Optional[str]. Data sink ID. When provided instead of data_sink, the data sink will be looked up by ID.
299
317
 
@@ -312,6 +330,8 @@ class PipelinesClient:
312
330
  from llama_cloud import (
313
331
  ConfigurableDataSinkNames,
314
332
  DataSinkCreate,
333
+ EmbeddingConfig,
334
+ EmbeddingConfigType,
315
335
  EvalExecutionParams,
316
336
  FilterCondition,
317
337
  LlamaParseParameters,
@@ -327,6 +347,9 @@ class PipelinesClient:
327
347
  )
328
348
  client.pipelines.update_existing_pipeline(
329
349
  pipeline_id="string",
350
+ embedding_config=EmbeddingConfig(
351
+ type=EmbeddingConfigType.OPENAI_EMBEDDING,
352
+ ),
330
353
  data_sink=DataSinkCreate(
331
354
  name="string",
332
355
  sink_type=ConfigurableDataSinkNames.CHROMA,
@@ -345,6 +368,10 @@ class PipelinesClient:
345
368
  )
346
369
  """
347
370
  _request: typing.Dict[str, typing.Any] = {}
371
+ if embedding_config is not OMIT:
372
+ _request["embedding_config"] = embedding_config
373
+ if transform_config is not OMIT:
374
+ _request["transform_config"] = transform_config
348
375
  if configured_transformations is not OMIT:
349
376
  _request["configured_transformations"] = configured_transformations
350
377
  if data_sink_id is not OMIT:
@@ -1281,6 +1308,7 @@ class PipelinesClient:
1281
1308
  from llama_cloud import (
1282
1309
  ChatData,
1283
1310
  FilterCondition,
1311
+ LlmParameters,
1284
1312
  MetadataFilters,
1285
1313
  PresetRetrievalParams,
1286
1314
  RetrievalMode,
@@ -1301,6 +1329,7 @@ class PipelinesClient:
1301
1329
  ),
1302
1330
  retrieval_mode=RetrievalMode.CHUNKS,
1303
1331
  ),
1332
+ llm_parameters=LlmParameters(),
1304
1333
  ),
1305
1334
  )
1306
1335
  """
@@ -1678,6 +1707,8 @@ class AsyncPipelinesClient:
1678
1707
  from llama_cloud import (
1679
1708
  ConfigurableDataSinkNames,
1680
1709
  DataSinkCreate,
1710
+ EmbeddingConfig,
1711
+ EmbeddingConfigType,
1681
1712
  EvalExecutionParams,
1682
1713
  FilterCondition,
1683
1714
  LlamaParseParameters,
@@ -1695,6 +1726,9 @@ class AsyncPipelinesClient:
1695
1726
  )
1696
1727
  await client.pipelines.create_pipeline(
1697
1728
  request=PipelineCreate(
1729
+ embedding_config=EmbeddingConfig(
1730
+ type=EmbeddingConfigType.OPENAI_EMBEDDING,
1731
+ ),
1698
1732
  data_sink=DataSinkCreate(
1699
1733
  name="string",
1700
1734
  sink_type=ConfigurableDataSinkNames.CHROMA,
@@ -1746,6 +1780,8 @@ class AsyncPipelinesClient:
1746
1780
  from llama_cloud import (
1747
1781
  ConfigurableDataSinkNames,
1748
1782
  DataSinkCreate,
1783
+ EmbeddingConfig,
1784
+ EmbeddingConfigType,
1749
1785
  EvalExecutionParams,
1750
1786
  FilterCondition,
1751
1787
  LlamaParseParameters,
@@ -1763,6 +1799,9 @@ class AsyncPipelinesClient:
1763
1799
  )
1764
1800
  await client.pipelines.upsert_pipeline(
1765
1801
  request=PipelineCreate(
1802
+ embedding_config=EmbeddingConfig(
1803
+ type=EmbeddingConfigType.OPENAI_EMBEDDING,
1804
+ ),
1766
1805
  data_sink=DataSinkCreate(
1767
1806
  name="string",
1768
1807
  sink_type=ConfigurableDataSinkNames.CHROMA,
@@ -1837,6 +1876,8 @@ class AsyncPipelinesClient:
1837
1876
  self,
1838
1877
  pipeline_id: str,
1839
1878
  *,
1879
+ embedding_config: typing.Optional[EmbeddingConfig] = OMIT,
1880
+ transform_config: typing.Optional[PipelineUpdateTransformConfig] = OMIT,
1840
1881
  configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]] = OMIT,
1841
1882
  data_sink_id: typing.Optional[str] = OMIT,
1842
1883
  data_sink: typing.Optional[DataSinkCreate] = OMIT,
@@ -1852,7 +1893,11 @@ class AsyncPipelinesClient:
1852
1893
  Parameters:
1853
1894
  - pipeline_id: str.
1854
1895
 
1855
- - configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]].
1896
+ - embedding_config: typing.Optional[EmbeddingConfig]. Configuration for the embedding model.
1897
+
1898
+ - transform_config: typing.Optional[PipelineUpdateTransformConfig]. Configuration for the transformation.
1899
+
1900
+ - configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]]. List of configured transformations.
1856
1901
 
1857
1902
  - data_sink_id: typing.Optional[str]. Data sink ID. When provided instead of data_sink, the data sink will be looked up by ID.
1858
1903
 
@@ -1871,6 +1916,8 @@ class AsyncPipelinesClient:
1871
1916
  from llama_cloud import (
1872
1917
  ConfigurableDataSinkNames,
1873
1918
  DataSinkCreate,
1919
+ EmbeddingConfig,
1920
+ EmbeddingConfigType,
1874
1921
  EvalExecutionParams,
1875
1922
  FilterCondition,
1876
1923
  LlamaParseParameters,
@@ -1886,6 +1933,9 @@ class AsyncPipelinesClient:
1886
1933
  )
1887
1934
  await client.pipelines.update_existing_pipeline(
1888
1935
  pipeline_id="string",
1936
+ embedding_config=EmbeddingConfig(
1937
+ type=EmbeddingConfigType.OPENAI_EMBEDDING,
1938
+ ),
1889
1939
  data_sink=DataSinkCreate(
1890
1940
  name="string",
1891
1941
  sink_type=ConfigurableDataSinkNames.CHROMA,
@@ -1904,6 +1954,10 @@ class AsyncPipelinesClient:
1904
1954
  )
1905
1955
  """
1906
1956
  _request: typing.Dict[str, typing.Any] = {}
1957
+ if embedding_config is not OMIT:
1958
+ _request["embedding_config"] = embedding_config
1959
+ if transform_config is not OMIT:
1960
+ _request["transform_config"] = transform_config
1907
1961
  if configured_transformations is not OMIT:
1908
1962
  _request["configured_transformations"] = configured_transformations
1909
1963
  if data_sink_id is not OMIT:
@@ -2842,6 +2896,7 @@ class AsyncPipelinesClient:
2842
2896
  from llama_cloud import (
2843
2897
  ChatData,
2844
2898
  FilterCondition,
2899
+ LlmParameters,
2845
2900
  MetadataFilters,
2846
2901
  PresetRetrievalParams,
2847
2902
  RetrievalMode,
@@ -2862,6 +2917,7 @@ class AsyncPipelinesClient:
2862
2917
  ),
2863
2918
  retrieval_mode=RetrievalMode.CHUNKS,
2864
2919
  ),
2920
+ llm_parameters=LlmParameters(),
2865
2921
  ),
2866
2922
  )
2867
2923
  """
@@ -1,5 +1,15 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from .pipeline_file_update_custom_metadata_value import PipelineFileUpdateCustomMetadataValue
4
+ from .pipeline_update_transform_config import (
5
+ PipelineUpdateTransformConfig,
6
+ PipelineUpdateTransformConfig_Advanced,
7
+ PipelineUpdateTransformConfig_Auto,
8
+ )
4
9
 
5
- __all__ = ["PipelineFileUpdateCustomMetadataValue"]
10
+ __all__ = [
11
+ "PipelineFileUpdateCustomMetadataValue",
12
+ "PipelineUpdateTransformConfig",
13
+ "PipelineUpdateTransformConfig_Advanced",
14
+ "PipelineUpdateTransformConfig_Auto",
15
+ ]
@@ -0,0 +1,31 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+
5
+ import typing
6
+
7
+ import typing_extensions
8
+
9
+ from ....types.advanced_mode_transform_config import AdvancedModeTransformConfig
10
+ from ....types.auto_transform_config import AutoTransformConfig
11
+
12
+
13
+ class PipelineUpdateTransformConfig_Auto(AutoTransformConfig):
14
+ mode: typing_extensions.Literal["auto"]
15
+
16
+ class Config:
17
+ frozen = True
18
+ smart_union = True
19
+ allow_population_by_field_name = True
20
+
21
+
22
+ class PipelineUpdateTransformConfig_Advanced(AdvancedModeTransformConfig):
23
+ mode: typing_extensions.Literal["advanced"]
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ allow_population_by_field_name = True
29
+
30
+
31
+ PipelineUpdateTransformConfig = typing.Union[PipelineUpdateTransformConfig_Auto, PipelineUpdateTransformConfig_Advanced]