llama-cloud 0.1.18__py3-none-any.whl → 0.1.20__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 (92) hide show
  1. llama_cloud/__init__.py +202 -42
  2. llama_cloud/client.py +3 -0
  3. llama_cloud/resources/__init__.py +61 -2
  4. llama_cloud/resources/beta/__init__.py +2 -0
  5. llama_cloud/resources/beta/client.py +371 -0
  6. llama_cloud/resources/data_sinks/__init__.py +18 -2
  7. llama_cloud/resources/data_sinks/client.py +2 -94
  8. llama_cloud/resources/data_sinks/types/__init__.py +18 -2
  9. llama_cloud/resources/data_sinks/types/data_sink_update_component.py +65 -7
  10. llama_cloud/resources/data_sources/__init__.py +30 -2
  11. llama_cloud/resources/data_sources/types/__init__.py +28 -1
  12. llama_cloud/resources/data_sources/types/data_source_update_component.py +2 -23
  13. llama_cloud/resources/data_sources/types/data_source_update_component_one.py +122 -0
  14. llama_cloud/resources/embedding_model_configs/client.py +82 -22
  15. llama_cloud/resources/files/client.py +18 -4
  16. llama_cloud/resources/llama_extract/__init__.py +21 -0
  17. llama_cloud/resources/llama_extract/client.py +227 -114
  18. llama_cloud/resources/llama_extract/types/__init__.py +21 -0
  19. llama_cloud/resources/parsing/client.py +123 -4
  20. llama_cloud/resources/pipelines/client.py +116 -11
  21. llama_cloud/types/__init__.py +172 -52
  22. llama_cloud/types/{extract_schema_validate_request.py → audio_block.py} +5 -3
  23. llama_cloud/types/batch.py +47 -0
  24. llama_cloud/types/batch_item.py +40 -0
  25. llama_cloud/types/batch_paginated_list.py +35 -0
  26. llama_cloud/types/{base_prompt_template.py → batch_public_output.py} +7 -7
  27. llama_cloud/types/cloud_confluence_data_source.py +1 -0
  28. llama_cloud/types/cloud_jira_data_source.py +0 -4
  29. llama_cloud/types/cloud_postgres_vector_store.py +2 -0
  30. llama_cloud/types/cloud_sharepoint_data_source.py +1 -0
  31. llama_cloud/types/data_sink_component.py +65 -7
  32. llama_cloud/types/data_sink_create_component.py +65 -7
  33. llama_cloud/types/data_source_component.py +2 -23
  34. llama_cloud/types/data_source_component_one.py +122 -0
  35. llama_cloud/types/data_source_create_component.py +2 -23
  36. llama_cloud/types/data_source_create_component_one.py +122 -0
  37. llama_cloud/types/{extract_agent_update.py → data_source_update_dispatcher_config.py} +6 -6
  38. llama_cloud/types/{node_parser.py → delete_params.py} +7 -9
  39. llama_cloud/types/{extract_agent_create.py → document_ingestion_job_params.py} +11 -7
  40. llama_cloud/types/extract_config.py +2 -0
  41. llama_cloud/types/extract_job_create.py +1 -2
  42. llama_cloud/types/fail_page_mode.py +29 -0
  43. llama_cloud/types/file_count_by_status_response.py +37 -0
  44. llama_cloud/types/file_parse_public.py +36 -0
  45. llama_cloud/types/job_names.py +8 -12
  46. llama_cloud/types/job_record.py +2 -2
  47. llama_cloud/types/job_record_parameters.py +111 -0
  48. llama_cloud/types/l_lama_parse_transform_config.py +37 -0
  49. llama_cloud/types/legacy_parse_job_config.py +189 -0
  50. llama_cloud/types/llama_index_core_base_llms_types_chat_message_blocks_item.py +13 -1
  51. llama_cloud/types/llama_parse_parameters.py +8 -0
  52. llama_cloud/types/load_files_job_config.py +35 -0
  53. llama_cloud/types/message_role.py +4 -0
  54. llama_cloud/types/parse_job_config.py +134 -0
  55. llama_cloud/types/pg_vector_distance_method.py +43 -0
  56. llama_cloud/types/{extract_job_create_batch.py → pg_vector_hnsw_settings.py} +12 -9
  57. llama_cloud/types/pg_vector_vector_type.py +35 -0
  58. llama_cloud/types/pipeline.py +2 -4
  59. llama_cloud/types/pipeline_create.py +3 -2
  60. llama_cloud/types/pipeline_data_source.py +3 -0
  61. llama_cloud/types/pipeline_data_source_component.py +2 -23
  62. llama_cloud/types/pipeline_data_source_component_one.py +122 -0
  63. llama_cloud/types/pipeline_data_source_status.py +33 -0
  64. llama_cloud/types/pipeline_file.py +1 -0
  65. llama_cloud/types/pipeline_file_update_dispatcher_config.py +38 -0
  66. llama_cloud/types/{markdown_node_parser.py → pipeline_file_updater_config.py} +14 -15
  67. llama_cloud/types/pipeline_managed_ingestion_job_params.py +37 -0
  68. llama_cloud/types/pipeline_metadata_config.py +36 -0
  69. llama_cloud/types/prompt_conf.py +3 -0
  70. llama_cloud/types/struct_parse_conf.py +4 -1
  71. {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/METADATA +4 -2
  72. {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/RECORD +82 -68
  73. {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/WHEEL +1 -1
  74. llama_cloud/types/character_splitter.py +0 -46
  75. llama_cloud/types/code_splitter.py +0 -50
  76. llama_cloud/types/configured_transformation_item.py +0 -46
  77. llama_cloud/types/configured_transformation_item_component.py +0 -22
  78. llama_cloud/types/llm.py +0 -60
  79. llama_cloud/types/markdown_element_node_parser.py +0 -51
  80. llama_cloud/types/page_splitter_node_parser.py +0 -42
  81. llama_cloud/types/pydantic_program_mode.py +0 -41
  82. llama_cloud/types/sentence_splitter.py +0 -50
  83. llama_cloud/types/token_text_splitter.py +0 -47
  84. /llama_cloud/{types → resources/llama_extract/types}/extract_agent_create_data_schema.py +0 -0
  85. /llama_cloud/{types → resources/llama_extract/types}/extract_agent_create_data_schema_zero_value.py +0 -0
  86. /llama_cloud/{types → resources/llama_extract/types}/extract_agent_update_data_schema.py +0 -0
  87. /llama_cloud/{types → resources/llama_extract/types}/extract_agent_update_data_schema_zero_value.py +0 -0
  88. /llama_cloud/{types → resources/llama_extract/types}/extract_job_create_batch_data_schema_override.py +0 -0
  89. /llama_cloud/{types → resources/llama_extract/types}/extract_job_create_batch_data_schema_override_zero_value.py +0 -0
  90. /llama_cloud/{types → resources/llama_extract/types}/extract_schema_validate_request_data_schema.py +0 -0
  91. /llama_cloud/{types → resources/llama_extract/types}/extract_schema_validate_request_data_schema_zero_value.py +0 -0
  92. {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/LICENSE +0 -0
@@ -4,6 +4,9 @@ import datetime as dt
4
4
  import typing
5
5
 
6
6
  from ..core.datetime_utils import serialize_datetime
7
+ from .batch import Batch
8
+ from .batch_item import BatchItem
9
+ from .managed_ingestion_status_response import ManagedIngestionStatusResponse
7
10
 
8
11
  try:
9
12
  import pydantic
@@ -14,13 +17,10 @@ except ImportError:
14
17
  import pydantic # type: ignore
15
18
 
16
19
 
17
- class BasePromptTemplate(pydantic.BaseModel):
18
- metadata: typing.Dict[str, typing.Any]
19
- template_vars: typing.List[str]
20
- kwargs: typing.Dict[str, str]
21
- output_parser: typing.Any
22
- template_var_mappings: typing.Optional[typing.Dict[str, typing.Any]]
23
- function_mappings: typing.Optional[typing.Dict[str, typing.Optional[str]]]
20
+ class BatchPublicOutput(pydantic.BaseModel):
21
+ batch: Batch
22
+ batch_items: typing.List[BatchItem]
23
+ ingestion_status: ManagedIngestionStatusResponse
24
24
 
25
25
  def json(self, **kwargs: typing.Any) -> str:
26
26
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -27,6 +27,7 @@ class CloudConfluenceDataSource(pydantic.BaseModel):
27
27
  cql: typing.Optional[str]
28
28
  label: typing.Optional[str]
29
29
  index_restricted_pages: typing.Optional[bool] = pydantic.Field(description="Whether to index restricted pages.")
30
+ keep_markdown_format: typing.Optional[bool] = pydantic.Field(description="Whether to keep the markdown format.")
30
31
  class_name: typing.Optional[str]
31
32
 
32
33
  def json(self, **kwargs: typing.Any) -> str:
@@ -15,10 +15,6 @@ except ImportError:
15
15
 
16
16
 
17
17
  class CloudJiraDataSource(pydantic.BaseModel):
18
- """
19
- Cloud Jira Data Source integrating JiraReader.
20
- """
21
-
22
18
  supports_access_control: typing.Optional[bool]
23
19
  email: typing.Optional[str]
24
20
  api_token: typing.Optional[str]
@@ -4,6 +4,7 @@ import datetime as dt
4
4
  import typing
5
5
 
6
6
  from ..core.datetime_utils import serialize_datetime
7
+ from .pg_vector_hnsw_settings import PgVectorHnswSettings
7
8
 
8
9
  try:
9
10
  import pydantic
@@ -26,6 +27,7 @@ class CloudPostgresVectorStore(pydantic.BaseModel):
26
27
  embed_dim: int
27
28
  hybrid_search: typing.Optional[bool]
28
29
  perform_setup: typing.Optional[bool]
30
+ hnsw_settings: typing.Optional[PgVectorHnswSettings]
29
31
  class_name: typing.Optional[str]
30
32
 
31
33
  def json(self, **kwargs: typing.Any) -> str:
@@ -25,6 +25,7 @@ class CloudSharepointDataSource(pydantic.BaseModel):
25
25
  client_secret: str = pydantic.Field(description="The client secret to use for authentication.")
26
26
  tenant_id: str = pydantic.Field(description="The tenant ID to use for authentication.")
27
27
  required_exts: typing.Optional[typing.List[str]]
28
+ get_permissions: typing.Optional[bool]
28
29
  class_name: typing.Optional[str]
29
30
 
30
31
  def json(self, **kwargs: typing.Any) -> str:
@@ -1,7 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  import typing
4
6
 
7
+ import typing_extensions
8
+
5
9
  from .cloud_azure_ai_search_vector_store import CloudAzureAiSearchVectorStore
6
10
  from .cloud_milvus_vector_store import CloudMilvusVectorStore
7
11
  from .cloud_mongo_db_atlas_vector_search import CloudMongoDbAtlasVectorSearch
@@ -9,12 +13,66 @@ from .cloud_pinecone_vector_store import CloudPineconeVectorStore
9
13
  from .cloud_postgres_vector_store import CloudPostgresVectorStore
10
14
  from .cloud_qdrant_vector_store import CloudQdrantVectorStore
11
15
 
16
+
17
+ class DataSinkComponent_AzureAiSearch(CloudAzureAiSearchVectorStore):
18
+ type: typing_extensions.Literal["azure_ai_search"]
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ allow_population_by_field_name = True
24
+
25
+
26
+ class DataSinkComponent_Milvus(CloudMilvusVectorStore):
27
+ type: typing_extensions.Literal["milvus"]
28
+
29
+ class Config:
30
+ frozen = True
31
+ smart_union = True
32
+ allow_population_by_field_name = True
33
+
34
+
35
+ class DataSinkComponent_MongodbAtlas(CloudMongoDbAtlasVectorSearch):
36
+ type: typing_extensions.Literal["mongodb_atlas"]
37
+
38
+ class Config:
39
+ frozen = True
40
+ smart_union = True
41
+ allow_population_by_field_name = True
42
+
43
+
44
+ class DataSinkComponent_Pinecone(CloudPineconeVectorStore):
45
+ type: typing_extensions.Literal["pinecone"]
46
+
47
+ class Config:
48
+ frozen = True
49
+ smart_union = True
50
+ allow_population_by_field_name = True
51
+
52
+
53
+ class DataSinkComponent_Postgres(CloudPostgresVectorStore):
54
+ type: typing_extensions.Literal["postgres"]
55
+
56
+ class Config:
57
+ frozen = True
58
+ smart_union = True
59
+ allow_population_by_field_name = True
60
+
61
+
62
+ class DataSinkComponent_Qdrant(CloudQdrantVectorStore):
63
+ type: typing_extensions.Literal["qdrant"]
64
+
65
+ class Config:
66
+ frozen = True
67
+ smart_union = True
68
+ allow_population_by_field_name = True
69
+
70
+
12
71
  DataSinkComponent = typing.Union[
13
- typing.Dict[str, typing.Any],
14
- CloudPineconeVectorStore,
15
- CloudPostgresVectorStore,
16
- CloudQdrantVectorStore,
17
- CloudAzureAiSearchVectorStore,
18
- CloudMongoDbAtlasVectorSearch,
19
- CloudMilvusVectorStore,
72
+ DataSinkComponent_AzureAiSearch,
73
+ DataSinkComponent_Milvus,
74
+ DataSinkComponent_MongodbAtlas,
75
+ DataSinkComponent_Pinecone,
76
+ DataSinkComponent_Postgres,
77
+ DataSinkComponent_Qdrant,
20
78
  ]
@@ -1,7 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  import typing
4
6
 
7
+ import typing_extensions
8
+
5
9
  from .cloud_azure_ai_search_vector_store import CloudAzureAiSearchVectorStore
6
10
  from .cloud_milvus_vector_store import CloudMilvusVectorStore
7
11
  from .cloud_mongo_db_atlas_vector_search import CloudMongoDbAtlasVectorSearch
@@ -9,12 +13,66 @@ from .cloud_pinecone_vector_store import CloudPineconeVectorStore
9
13
  from .cloud_postgres_vector_store import CloudPostgresVectorStore
10
14
  from .cloud_qdrant_vector_store import CloudQdrantVectorStore
11
15
 
16
+
17
+ class DataSinkCreateComponent_AzureAiSearch(CloudAzureAiSearchVectorStore):
18
+ type: typing_extensions.Literal["azure_ai_search"]
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ allow_population_by_field_name = True
24
+
25
+
26
+ class DataSinkCreateComponent_Milvus(CloudMilvusVectorStore):
27
+ type: typing_extensions.Literal["milvus"]
28
+
29
+ class Config:
30
+ frozen = True
31
+ smart_union = True
32
+ allow_population_by_field_name = True
33
+
34
+
35
+ class DataSinkCreateComponent_MongodbAtlas(CloudMongoDbAtlasVectorSearch):
36
+ type: typing_extensions.Literal["mongodb_atlas"]
37
+
38
+ class Config:
39
+ frozen = True
40
+ smart_union = True
41
+ allow_population_by_field_name = True
42
+
43
+
44
+ class DataSinkCreateComponent_Pinecone(CloudPineconeVectorStore):
45
+ type: typing_extensions.Literal["pinecone"]
46
+
47
+ class Config:
48
+ frozen = True
49
+ smart_union = True
50
+ allow_population_by_field_name = True
51
+
52
+
53
+ class DataSinkCreateComponent_Postgres(CloudPostgresVectorStore):
54
+ type: typing_extensions.Literal["postgres"]
55
+
56
+ class Config:
57
+ frozen = True
58
+ smart_union = True
59
+ allow_population_by_field_name = True
60
+
61
+
62
+ class DataSinkCreateComponent_Qdrant(CloudQdrantVectorStore):
63
+ type: typing_extensions.Literal["qdrant"]
64
+
65
+ class Config:
66
+ frozen = True
67
+ smart_union = True
68
+ allow_population_by_field_name = True
69
+
70
+
12
71
  DataSinkCreateComponent = typing.Union[
13
- typing.Dict[str, typing.Any],
14
- CloudPineconeVectorStore,
15
- CloudPostgresVectorStore,
16
- CloudQdrantVectorStore,
17
- CloudAzureAiSearchVectorStore,
18
- CloudMongoDbAtlasVectorSearch,
19
- CloudMilvusVectorStore,
72
+ DataSinkCreateComponent_AzureAiSearch,
73
+ DataSinkCreateComponent_Milvus,
74
+ DataSinkCreateComponent_MongodbAtlas,
75
+ DataSinkCreateComponent_Pinecone,
76
+ DataSinkCreateComponent_Postgres,
77
+ DataSinkCreateComponent_Qdrant,
20
78
  ]
@@ -2,27 +2,6 @@
2
2
 
3
3
  import typing
4
4
 
5
- from .cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
6
- from .cloud_box_data_source import CloudBoxDataSource
7
- from .cloud_confluence_data_source import CloudConfluenceDataSource
8
- from .cloud_google_drive_data_source import CloudGoogleDriveDataSource
9
- from .cloud_jira_data_source import CloudJiraDataSource
10
- from .cloud_notion_page_data_source import CloudNotionPageDataSource
11
- from .cloud_one_drive_data_source import CloudOneDriveDataSource
12
- from .cloud_s_3_data_source import CloudS3DataSource
13
- from .cloud_sharepoint_data_source import CloudSharepointDataSource
14
- from .cloud_slack_data_source import CloudSlackDataSource
5
+ from .data_source_component_one import DataSourceComponentOne
15
6
 
16
- DataSourceComponent = typing.Union[
17
- typing.Dict[str, typing.Any],
18
- CloudS3DataSource,
19
- CloudAzStorageBlobDataSource,
20
- CloudGoogleDriveDataSource,
21
- CloudOneDriveDataSource,
22
- CloudSharepointDataSource,
23
- CloudSlackDataSource,
24
- CloudNotionPageDataSource,
25
- CloudConfluenceDataSource,
26
- CloudJiraDataSource,
27
- CloudBoxDataSource,
28
- ]
7
+ DataSourceComponent = typing.Union[typing.Dict[str, typing.Any], DataSourceComponentOne]
@@ -0,0 +1,122 @@
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 .cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
10
+ from .cloud_box_data_source import CloudBoxDataSource
11
+ from .cloud_confluence_data_source import CloudConfluenceDataSource
12
+ from .cloud_google_drive_data_source import CloudGoogleDriveDataSource
13
+ from .cloud_jira_data_source import CloudJiraDataSource
14
+ from .cloud_notion_page_data_source import CloudNotionPageDataSource
15
+ from .cloud_one_drive_data_source import CloudOneDriveDataSource
16
+ from .cloud_s_3_data_source import CloudS3DataSource
17
+ from .cloud_sharepoint_data_source import CloudSharepointDataSource
18
+ from .cloud_slack_data_source import CloudSlackDataSource
19
+
20
+
21
+ class DataSourceComponentOne_AzureStorageBlob(CloudAzStorageBlobDataSource):
22
+ type: typing_extensions.Literal["AZURE_STORAGE_BLOB"]
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ allow_population_by_field_name = True
28
+
29
+
30
+ class DataSourceComponentOne_Box(CloudBoxDataSource):
31
+ type: typing_extensions.Literal["BOX"]
32
+
33
+ class Config:
34
+ frozen = True
35
+ smart_union = True
36
+ allow_population_by_field_name = True
37
+
38
+
39
+ class DataSourceComponentOne_Confluence(CloudConfluenceDataSource):
40
+ type: typing_extensions.Literal["CONFLUENCE"]
41
+
42
+ class Config:
43
+ frozen = True
44
+ smart_union = True
45
+ allow_population_by_field_name = True
46
+
47
+
48
+ class DataSourceComponentOne_GoogleDrive(CloudGoogleDriveDataSource):
49
+ type: typing_extensions.Literal["GOOGLE_DRIVE"]
50
+
51
+ class Config:
52
+ frozen = True
53
+ smart_union = True
54
+ allow_population_by_field_name = True
55
+
56
+
57
+ class DataSourceComponentOne_Jira(CloudJiraDataSource):
58
+ type: typing_extensions.Literal["JIRA"]
59
+
60
+ class Config:
61
+ frozen = True
62
+ smart_union = True
63
+ allow_population_by_field_name = True
64
+
65
+
66
+ class DataSourceComponentOne_MicrosoftOnedrive(CloudOneDriveDataSource):
67
+ type: typing_extensions.Literal["MICROSOFT_ONEDRIVE"]
68
+
69
+ class Config:
70
+ frozen = True
71
+ smart_union = True
72
+ allow_population_by_field_name = True
73
+
74
+
75
+ class DataSourceComponentOne_MicrosoftSharepoint(CloudSharepointDataSource):
76
+ type: typing_extensions.Literal["MICROSOFT_SHAREPOINT"]
77
+
78
+ class Config:
79
+ frozen = True
80
+ smart_union = True
81
+ allow_population_by_field_name = True
82
+
83
+
84
+ class DataSourceComponentOne_NotionPage(CloudNotionPageDataSource):
85
+ type: typing_extensions.Literal["NOTION_PAGE"]
86
+
87
+ class Config:
88
+ frozen = True
89
+ smart_union = True
90
+ allow_population_by_field_name = True
91
+
92
+
93
+ class DataSourceComponentOne_S3(CloudS3DataSource):
94
+ type: typing_extensions.Literal["S3"]
95
+
96
+ class Config:
97
+ frozen = True
98
+ smart_union = True
99
+ allow_population_by_field_name = True
100
+
101
+
102
+ class DataSourceComponentOne_Slack(CloudSlackDataSource):
103
+ type: typing_extensions.Literal["SLACK"]
104
+
105
+ class Config:
106
+ frozen = True
107
+ smart_union = True
108
+ allow_population_by_field_name = True
109
+
110
+
111
+ DataSourceComponentOne = typing.Union[
112
+ DataSourceComponentOne_AzureStorageBlob,
113
+ DataSourceComponentOne_Box,
114
+ DataSourceComponentOne_Confluence,
115
+ DataSourceComponentOne_GoogleDrive,
116
+ DataSourceComponentOne_Jira,
117
+ DataSourceComponentOne_MicrosoftOnedrive,
118
+ DataSourceComponentOne_MicrosoftSharepoint,
119
+ DataSourceComponentOne_NotionPage,
120
+ DataSourceComponentOne_S3,
121
+ DataSourceComponentOne_Slack,
122
+ ]
@@ -2,27 +2,6 @@
2
2
 
3
3
  import typing
4
4
 
5
- from .cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
6
- from .cloud_box_data_source import CloudBoxDataSource
7
- from .cloud_confluence_data_source import CloudConfluenceDataSource
8
- from .cloud_google_drive_data_source import CloudGoogleDriveDataSource
9
- from .cloud_jira_data_source import CloudJiraDataSource
10
- from .cloud_notion_page_data_source import CloudNotionPageDataSource
11
- from .cloud_one_drive_data_source import CloudOneDriveDataSource
12
- from .cloud_s_3_data_source import CloudS3DataSource
13
- from .cloud_sharepoint_data_source import CloudSharepointDataSource
14
- from .cloud_slack_data_source import CloudSlackDataSource
5
+ from .data_source_create_component_one import DataSourceCreateComponentOne
15
6
 
16
- DataSourceCreateComponent = typing.Union[
17
- typing.Dict[str, typing.Any],
18
- CloudS3DataSource,
19
- CloudAzStorageBlobDataSource,
20
- CloudGoogleDriveDataSource,
21
- CloudOneDriveDataSource,
22
- CloudSharepointDataSource,
23
- CloudSlackDataSource,
24
- CloudNotionPageDataSource,
25
- CloudConfluenceDataSource,
26
- CloudJiraDataSource,
27
- CloudBoxDataSource,
28
- ]
7
+ DataSourceCreateComponent = typing.Union[typing.Dict[str, typing.Any], DataSourceCreateComponentOne]
@@ -0,0 +1,122 @@
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 .cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
10
+ from .cloud_box_data_source import CloudBoxDataSource
11
+ from .cloud_confluence_data_source import CloudConfluenceDataSource
12
+ from .cloud_google_drive_data_source import CloudGoogleDriveDataSource
13
+ from .cloud_jira_data_source import CloudJiraDataSource
14
+ from .cloud_notion_page_data_source import CloudNotionPageDataSource
15
+ from .cloud_one_drive_data_source import CloudOneDriveDataSource
16
+ from .cloud_s_3_data_source import CloudS3DataSource
17
+ from .cloud_sharepoint_data_source import CloudSharepointDataSource
18
+ from .cloud_slack_data_source import CloudSlackDataSource
19
+
20
+
21
+ class DataSourceCreateComponentOne_AzureStorageBlob(CloudAzStorageBlobDataSource):
22
+ type: typing_extensions.Literal["AZURE_STORAGE_BLOB"]
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ allow_population_by_field_name = True
28
+
29
+
30
+ class DataSourceCreateComponentOne_Box(CloudBoxDataSource):
31
+ type: typing_extensions.Literal["BOX"]
32
+
33
+ class Config:
34
+ frozen = True
35
+ smart_union = True
36
+ allow_population_by_field_name = True
37
+
38
+
39
+ class DataSourceCreateComponentOne_Confluence(CloudConfluenceDataSource):
40
+ type: typing_extensions.Literal["CONFLUENCE"]
41
+
42
+ class Config:
43
+ frozen = True
44
+ smart_union = True
45
+ allow_population_by_field_name = True
46
+
47
+
48
+ class DataSourceCreateComponentOne_GoogleDrive(CloudGoogleDriveDataSource):
49
+ type: typing_extensions.Literal["GOOGLE_DRIVE"]
50
+
51
+ class Config:
52
+ frozen = True
53
+ smart_union = True
54
+ allow_population_by_field_name = True
55
+
56
+
57
+ class DataSourceCreateComponentOne_Jira(CloudJiraDataSource):
58
+ type: typing_extensions.Literal["JIRA"]
59
+
60
+ class Config:
61
+ frozen = True
62
+ smart_union = True
63
+ allow_population_by_field_name = True
64
+
65
+
66
+ class DataSourceCreateComponentOne_MicrosoftOnedrive(CloudOneDriveDataSource):
67
+ type: typing_extensions.Literal["MICROSOFT_ONEDRIVE"]
68
+
69
+ class Config:
70
+ frozen = True
71
+ smart_union = True
72
+ allow_population_by_field_name = True
73
+
74
+
75
+ class DataSourceCreateComponentOne_MicrosoftSharepoint(CloudSharepointDataSource):
76
+ type: typing_extensions.Literal["MICROSOFT_SHAREPOINT"]
77
+
78
+ class Config:
79
+ frozen = True
80
+ smart_union = True
81
+ allow_population_by_field_name = True
82
+
83
+
84
+ class DataSourceCreateComponentOne_NotionPage(CloudNotionPageDataSource):
85
+ type: typing_extensions.Literal["NOTION_PAGE"]
86
+
87
+ class Config:
88
+ frozen = True
89
+ smart_union = True
90
+ allow_population_by_field_name = True
91
+
92
+
93
+ class DataSourceCreateComponentOne_S3(CloudS3DataSource):
94
+ type: typing_extensions.Literal["S3"]
95
+
96
+ class Config:
97
+ frozen = True
98
+ smart_union = True
99
+ allow_population_by_field_name = True
100
+
101
+
102
+ class DataSourceCreateComponentOne_Slack(CloudSlackDataSource):
103
+ type: typing_extensions.Literal["SLACK"]
104
+
105
+ class Config:
106
+ frozen = True
107
+ smart_union = True
108
+ allow_population_by_field_name = True
109
+
110
+
111
+ DataSourceCreateComponentOne = typing.Union[
112
+ DataSourceCreateComponentOne_AzureStorageBlob,
113
+ DataSourceCreateComponentOne_Box,
114
+ DataSourceCreateComponentOne_Confluence,
115
+ DataSourceCreateComponentOne_GoogleDrive,
116
+ DataSourceCreateComponentOne_Jira,
117
+ DataSourceCreateComponentOne_MicrosoftOnedrive,
118
+ DataSourceCreateComponentOne_MicrosoftSharepoint,
119
+ DataSourceCreateComponentOne_NotionPage,
120
+ DataSourceCreateComponentOne_S3,
121
+ DataSourceCreateComponentOne_Slack,
122
+ ]
@@ -4,8 +4,7 @@ import datetime as dt
4
4
  import typing
5
5
 
6
6
  from ..core.datetime_utils import serialize_datetime
7
- from .extract_agent_update_data_schema import ExtractAgentUpdateDataSchema
8
- from .extract_config import ExtractConfig
7
+ from .delete_params import DeleteParams
9
8
 
10
9
  try:
11
10
  import pydantic
@@ -16,13 +15,14 @@ except ImportError:
16
15
  import pydantic # type: ignore
17
16
 
18
17
 
19
- class ExtractAgentUpdate(pydantic.BaseModel):
18
+ class DataSourceUpdateDispatcherConfig(pydantic.BaseModel):
20
19
  """
21
- Settings for updating an extraction schema.
20
+ Schema for the parameters of a data source dispatcher job.
22
21
  """
23
22
 
24
- data_schema: ExtractAgentUpdateDataSchema = pydantic.Field(description="The schema of the data")
25
- config: ExtractConfig = pydantic.Field(description="The configuration parameters for the extraction agent.")
23
+ should_delete: typing.Optional[bool]
24
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Any]]
25
+ delete_info: typing.Optional[DeleteParams]
26
26
 
27
27
  def json(self, **kwargs: typing.Any) -> str:
28
28
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -14,18 +14,16 @@ except ImportError:
14
14
  import pydantic # type: ignore
15
15
 
16
16
 
17
- class NodeParser(pydantic.BaseModel):
17
+ class DeleteParams(pydantic.BaseModel):
18
18
  """
19
- Base interface for node parser.
19
+ Schema for the parameters of a delete job.
20
20
  """
21
21
 
22
- include_metadata: typing.Optional[bool] = pydantic.Field(
23
- description="Whether or not to consider metadata when splitting."
24
- )
25
- include_prev_next_rel: typing.Optional[bool] = pydantic.Field(description="Include prev/next node relationships.")
26
- callback_manager: typing.Optional[typing.Any]
27
- id_func: typing.Optional[str]
28
- class_name: typing.Optional[str]
22
+ document_ids_to_delete: typing.Optional[typing.List[str]]
23
+ files_ids_to_delete: typing.Optional[typing.List[str]]
24
+ data_sources_ids_to_delete: typing.Optional[typing.List[str]]
25
+ embed_collection_name: typing.Optional[str]
26
+ data_sink_id: typing.Optional[str]
29
27
 
30
28
  def json(self, **kwargs: typing.Any) -> str:
31
29
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -4,8 +4,7 @@ import datetime as dt
4
4
  import typing
5
5
 
6
6
  from ..core.datetime_utils import serialize_datetime
7
- from .extract_agent_create_data_schema import ExtractAgentCreateDataSchema
8
- from .extract_config import ExtractConfig
7
+ from .delete_params import DeleteParams
9
8
 
10
9
  try:
11
10
  import pydantic
@@ -16,14 +15,19 @@ except ImportError:
16
15
  import pydantic # type: ignore
17
16
 
18
17
 
19
- class ExtractAgentCreate(pydantic.BaseModel):
18
+ class DocumentIngestionJobParams(pydantic.BaseModel):
20
19
  """
21
- Settings for creating an extraction agent.
20
+ Schema for the parameters of a document ingestion job.
22
21
  """
23
22
 
24
- name: str = pydantic.Field(description="The name of the extraction schema")
25
- data_schema: ExtractAgentCreateDataSchema = pydantic.Field(description="The schema of the data.")
26
- config: ExtractConfig = pydantic.Field(description="The configuration parameters for the extraction agent.")
23
+ custom_metadata: typing.Optional[typing.Dict[str, typing.Any]]
24
+ resource_info: typing.Optional[typing.Dict[str, typing.Any]]
25
+ should_delete: typing.Optional[bool]
26
+ document_ids: typing.Optional[typing.List[str]]
27
+ pipeline_file_id: typing.Optional[str]
28
+ delete_info: typing.Optional[DeleteParams]
29
+ is_new_file: typing.Optional[bool] = pydantic.Field(description="Whether the file is new")
30
+ page_count: typing.Optional[int]
27
31
 
28
32
  def json(self, **kwargs: typing.Any) -> str:
29
33
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -24,6 +24,8 @@ class ExtractConfig(pydantic.BaseModel):
24
24
  extraction_target: typing.Optional[ExtractTarget] = pydantic.Field(description="The extraction target specified.")
25
25
  extraction_mode: typing.Optional[ExtractMode] = pydantic.Field(description="The extraction mode specified.")
26
26
  system_prompt: typing.Optional[str]
27
+ use_reasoning: typing.Optional[bool] = pydantic.Field(description="Whether to use reasoning for the extraction.")
28
+ cite_sources: typing.Optional[bool] = pydantic.Field(description="Whether to cite sources for the extraction.")
27
29
 
28
30
  def json(self, **kwargs: typing.Any) -> str:
29
31
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -22,8 +22,7 @@ class ExtractJobCreate(pydantic.BaseModel):
22
22
  """
23
23
 
24
24
  extraction_agent_id: str = pydantic.Field(description="The id of the extraction agent")
25
- file_id: typing.Optional[str]
26
- file: typing.Optional[str]
25
+ file_id: str = pydantic.Field(description="The id of the file")
27
26
  data_schema_override: typing.Optional[ExtractJobCreateDataSchemaOverride] = pydantic.Field(
28
27
  description="The data schema to override the extraction agent's data schema with"
29
28
  )