llama-cloud 0.0.15__py3-none-any.whl → 0.0.17__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.
- llama_cloud/__init__.py +22 -0
- llama_cloud/resources/__init__.py +2 -0
- llama_cloud/resources/data_sources/types/data_source_update_component_one.py +2 -0
- llama_cloud/resources/files/client.py +159 -0
- llama_cloud/resources/parsing/client.py +40 -0
- llama_cloud/resources/pipelines/__init__.py +2 -0
- llama_cloud/resources/pipelines/client.py +18 -2
- llama_cloud/resources/pipelines/types/__init__.py +2 -0
- llama_cloud/resources/pipelines/types/pipeline_update_embedding_config.py +11 -0
- llama_cloud/types/__init__.py +20 -0
- llama_cloud/types/cloud_az_storage_blob_data_source.py +1 -2
- llama_cloud/types/cloud_google_drive_data_source.py +39 -0
- llama_cloud/types/cloud_postgres_vector_store.py +6 -8
- llama_cloud/types/configurable_data_source_names.py +4 -0
- llama_cloud/types/configurable_transformation_names.py +4 -0
- llama_cloud/types/configured_transformation_item_component_one.py +2 -0
- llama_cloud/types/data_source_component_one.py +2 -0
- llama_cloud/types/data_source_create_component_one.py +2 -0
- llama_cloud/types/extend_vertex_text_embedding.py +58 -0
- llama_cloud/types/llama_parse_parameters.py +3 -1
- llama_cloud/types/llm_model_data.py +1 -0
- llama_cloud/types/llm_parameters.py +4 -1
- llama_cloud/types/page_screenshot_metadata.py +33 -0
- llama_cloud/types/page_screenshot_node_with_score.py +38 -0
- llama_cloud/types/pipeline.py +4 -0
- llama_cloud/types/pipeline_configuration_hashes.py +37 -0
- llama_cloud/types/pipeline_create_embedding_config.py +11 -0
- llama_cloud/types/pipeline_data_source_component_one.py +2 -0
- llama_cloud/types/pipeline_embedding_config.py +11 -0
- llama_cloud/types/pipeline_file.py +4 -0
- llama_cloud/types/pipeline_file_config_hash_value.py +5 -0
- llama_cloud/types/preset_retrieval_params.py +1 -0
- llama_cloud/types/retrieve_results.py +4 -0
- llama_cloud/types/vertex_ai_embedding_config.py +34 -0
- llama_cloud/types/vertex_embedding_mode.py +45 -0
- {llama_cloud-0.0.15.dist-info → llama_cloud-0.0.17.dist-info}/METADATA +1 -1
- {llama_cloud-0.0.15.dist-info → llama_cloud-0.0.17.dist-info}/RECORD +39 -31
- {llama_cloud-0.0.15.dist-info → llama_cloud-0.0.17.dist-info}/LICENSE +0 -0
- {llama_cloud-0.0.15.dist-info → llama_cloud-0.0.17.dist-info}/WHEEL +0 -0
llama_cloud/types/__init__.py
CHANGED
|
@@ -34,6 +34,7 @@ from .cloud_chroma_vector_store import CloudChromaVectorStore
|
|
|
34
34
|
from .cloud_confluence_data_source import CloudConfluenceDataSource
|
|
35
35
|
from .cloud_document import CloudDocument
|
|
36
36
|
from .cloud_document_create import CloudDocumentCreate
|
|
37
|
+
from .cloud_google_drive_data_source import CloudGoogleDriveDataSource
|
|
37
38
|
from .cloud_jira_data_source import CloudJiraDataSource
|
|
38
39
|
from .cloud_milvus_vector_store import CloudMilvusVectorStore
|
|
39
40
|
from .cloud_mongo_db_atlas_vector_search import CloudMongoDbAtlasVectorSearch
|
|
@@ -82,6 +83,7 @@ from .eval_execution_params_override import EvalExecutionParamsOverride
|
|
|
82
83
|
from .eval_question import EvalQuestion
|
|
83
84
|
from .eval_question_create import EvalQuestionCreate
|
|
84
85
|
from .eval_question_result import EvalQuestionResult
|
|
86
|
+
from .extend_vertex_text_embedding import ExtendVertexTextEmbedding
|
|
85
87
|
from .extraction_job import ExtractionJob
|
|
86
88
|
from .extraction_result import ExtractionResult
|
|
87
89
|
from .extraction_result_data_value import ExtractionResultDataValue
|
|
@@ -127,6 +129,8 @@ from .open_ai_embedding import OpenAiEmbedding
|
|
|
127
129
|
from .open_ai_embedding_config import OpenAiEmbeddingConfig
|
|
128
130
|
from .organization import Organization
|
|
129
131
|
from .organization_create import OrganizationCreate
|
|
132
|
+
from .page_screenshot_metadata import PageScreenshotMetadata
|
|
133
|
+
from .page_screenshot_node_with_score import PageScreenshotNodeWithScore
|
|
130
134
|
from .page_segmentation_config import PageSegmentationConfig
|
|
131
135
|
from .page_splitter_node_parser import PageSplitterNodeParser
|
|
132
136
|
from .parser_languages import ParserLanguages
|
|
@@ -137,6 +141,7 @@ from .parsing_job_markdown_result import ParsingJobMarkdownResult
|
|
|
137
141
|
from .parsing_job_text_result import ParsingJobTextResult
|
|
138
142
|
from .parsing_usage import ParsingUsage
|
|
139
143
|
from .pipeline import Pipeline
|
|
144
|
+
from .pipeline_configuration_hashes import PipelineConfigurationHashes
|
|
140
145
|
from .pipeline_create import PipelineCreate
|
|
141
146
|
from .pipeline_create_embedding_config import (
|
|
142
147
|
PipelineCreateEmbeddingConfig,
|
|
@@ -146,6 +151,7 @@ from .pipeline_create_embedding_config import (
|
|
|
146
151
|
PipelineCreateEmbeddingConfig_GeminiEmbedding,
|
|
147
152
|
PipelineCreateEmbeddingConfig_HuggingfaceApiEmbedding,
|
|
148
153
|
PipelineCreateEmbeddingConfig_OpenaiEmbedding,
|
|
154
|
+
PipelineCreateEmbeddingConfig_VertexaiEmbedding,
|
|
149
155
|
)
|
|
150
156
|
from .pipeline_create_transform_config import (
|
|
151
157
|
PipelineCreateTransformConfig,
|
|
@@ -166,8 +172,10 @@ from .pipeline_embedding_config import (
|
|
|
166
172
|
PipelineEmbeddingConfig_GeminiEmbedding,
|
|
167
173
|
PipelineEmbeddingConfig_HuggingfaceApiEmbedding,
|
|
168
174
|
PipelineEmbeddingConfig_OpenaiEmbedding,
|
|
175
|
+
PipelineEmbeddingConfig_VertexaiEmbedding,
|
|
169
176
|
)
|
|
170
177
|
from .pipeline_file import PipelineFile
|
|
178
|
+
from .pipeline_file_config_hash_value import PipelineFileConfigHashValue
|
|
171
179
|
from .pipeline_file_create import PipelineFileCreate
|
|
172
180
|
from .pipeline_file_create_custom_metadata_value import PipelineFileCreateCustomMetadataValue
|
|
173
181
|
from .pipeline_file_custom_metadata_value import PipelineFileCustomMetadataValue
|
|
@@ -208,6 +216,8 @@ from .user_organization_create import UserOrganizationCreate
|
|
|
208
216
|
from .user_organization_delete import UserOrganizationDelete
|
|
209
217
|
from .validation_error import ValidationError
|
|
210
218
|
from .validation_error_loc_item import ValidationErrorLocItem
|
|
219
|
+
from .vertex_ai_embedding_config import VertexAiEmbeddingConfig
|
|
220
|
+
from .vertex_embedding_mode import VertexEmbeddingMode
|
|
211
221
|
|
|
212
222
|
__all__ = [
|
|
213
223
|
"AdvancedModeTransformConfig",
|
|
@@ -240,6 +250,7 @@ __all__ = [
|
|
|
240
250
|
"CloudConfluenceDataSource",
|
|
241
251
|
"CloudDocument",
|
|
242
252
|
"CloudDocumentCreate",
|
|
253
|
+
"CloudGoogleDriveDataSource",
|
|
243
254
|
"CloudJiraDataSource",
|
|
244
255
|
"CloudMilvusVectorStore",
|
|
245
256
|
"CloudMongoDbAtlasVectorSearch",
|
|
@@ -288,6 +299,7 @@ __all__ = [
|
|
|
288
299
|
"EvalQuestion",
|
|
289
300
|
"EvalQuestionCreate",
|
|
290
301
|
"EvalQuestionResult",
|
|
302
|
+
"ExtendVertexTextEmbedding",
|
|
291
303
|
"ExtractionJob",
|
|
292
304
|
"ExtractionResult",
|
|
293
305
|
"ExtractionResultDataValue",
|
|
@@ -333,6 +345,8 @@ __all__ = [
|
|
|
333
345
|
"OpenAiEmbeddingConfig",
|
|
334
346
|
"Organization",
|
|
335
347
|
"OrganizationCreate",
|
|
348
|
+
"PageScreenshotMetadata",
|
|
349
|
+
"PageScreenshotNodeWithScore",
|
|
336
350
|
"PageSegmentationConfig",
|
|
337
351
|
"PageSplitterNodeParser",
|
|
338
352
|
"ParserLanguages",
|
|
@@ -343,6 +357,7 @@ __all__ = [
|
|
|
343
357
|
"ParsingJobTextResult",
|
|
344
358
|
"ParsingUsage",
|
|
345
359
|
"Pipeline",
|
|
360
|
+
"PipelineConfigurationHashes",
|
|
346
361
|
"PipelineCreate",
|
|
347
362
|
"PipelineCreateEmbeddingConfig",
|
|
348
363
|
"PipelineCreateEmbeddingConfig_AzureEmbedding",
|
|
@@ -351,6 +366,7 @@ __all__ = [
|
|
|
351
366
|
"PipelineCreateEmbeddingConfig_GeminiEmbedding",
|
|
352
367
|
"PipelineCreateEmbeddingConfig_HuggingfaceApiEmbedding",
|
|
353
368
|
"PipelineCreateEmbeddingConfig_OpenaiEmbedding",
|
|
369
|
+
"PipelineCreateEmbeddingConfig_VertexaiEmbedding",
|
|
354
370
|
"PipelineCreateTransformConfig",
|
|
355
371
|
"PipelineCreateTransformConfig_Advanced",
|
|
356
372
|
"PipelineCreateTransformConfig_Auto",
|
|
@@ -367,7 +383,9 @@ __all__ = [
|
|
|
367
383
|
"PipelineEmbeddingConfig_GeminiEmbedding",
|
|
368
384
|
"PipelineEmbeddingConfig_HuggingfaceApiEmbedding",
|
|
369
385
|
"PipelineEmbeddingConfig_OpenaiEmbedding",
|
|
386
|
+
"PipelineEmbeddingConfig_VertexaiEmbedding",
|
|
370
387
|
"PipelineFile",
|
|
388
|
+
"PipelineFileConfigHashValue",
|
|
371
389
|
"PipelineFileCreate",
|
|
372
390
|
"PipelineFileCreateCustomMetadataValue",
|
|
373
391
|
"PipelineFileCustomMetadataValue",
|
|
@@ -406,4 +424,6 @@ __all__ = [
|
|
|
406
424
|
"UserOrganizationDelete",
|
|
407
425
|
"ValidationError",
|
|
408
426
|
"ValidationErrorLocItem",
|
|
427
|
+
"VertexAiEmbeddingConfig",
|
|
428
|
+
"VertexEmbeddingMode",
|
|
409
429
|
]
|
|
@@ -21,9 +21,8 @@ class CloudAzStorageBlobDataSource(pydantic.BaseModel):
|
|
|
21
21
|
|
|
22
22
|
container_name: str = pydantic.Field(description="The name of the Azure Storage Blob container to read from.")
|
|
23
23
|
account_url: str = pydantic.Field(description="The Azure Storage Blob account URL to use for authentication.")
|
|
24
|
-
blob: typing.Optional[str] = pydantic.Field(description="The blob name to read from.")
|
|
25
24
|
prefix: typing.Optional[str] = pydantic.Field(
|
|
26
|
-
description="The prefix of the Azure Storage Blob objects to read from."
|
|
25
|
+
description="The prefix of the Azure Storage Blob objects to read from. Use this to filter files at the subdirectory level"
|
|
27
26
|
)
|
|
28
27
|
account_name: typing.Optional[str] = pydantic.Field(
|
|
29
28
|
description="The Azure Storage Blob account name to use for authentication."
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
|
10
|
+
if pydantic.__version__.startswith("1."):
|
|
11
|
+
raise ImportError
|
|
12
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
13
|
+
except ImportError:
|
|
14
|
+
import pydantic # type: ignore
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CloudGoogleDriveDataSource(pydantic.BaseModel):
|
|
18
|
+
"""
|
|
19
|
+
Base component object to capture class names.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
folder_id: str = pydantic.Field(description="The ID of the Google Drive folder to read from.")
|
|
23
|
+
service_account_key: typing.Dict[str, typing.Any] = pydantic.Field(
|
|
24
|
+
description="The service account key JSON to use for authentication."
|
|
25
|
+
)
|
|
26
|
+
class_name: typing.Optional[str]
|
|
27
|
+
|
|
28
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
29
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
30
|
+
return super().json(**kwargs_with_defaults)
|
|
31
|
+
|
|
32
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
33
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
34
|
+
return super().dict(**kwargs_with_defaults)
|
|
35
|
+
|
|
36
|
+
class Config:
|
|
37
|
+
frozen = True
|
|
38
|
+
smart_union = True
|
|
39
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -20,17 +20,15 @@ class CloudPostgresVectorStore(pydantic.BaseModel):
|
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
22
|
supports_nested_metadata_filters: typing.Optional[bool]
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
database: str
|
|
24
|
+
host: str
|
|
25
|
+
password: str
|
|
26
|
+
port: str
|
|
27
|
+
user: str
|
|
25
28
|
table_name: str
|
|
26
29
|
schema_name: str
|
|
27
30
|
embed_dim: int
|
|
28
|
-
hybrid_search: bool
|
|
29
|
-
text_search_config: str
|
|
30
|
-
cache_ok: bool
|
|
31
|
-
perform_setup: bool
|
|
32
|
-
debug: bool
|
|
33
|
-
use_jsonb: bool
|
|
31
|
+
hybrid_search: typing.Optional[bool]
|
|
34
32
|
class_name: typing.Optional[str]
|
|
35
33
|
|
|
36
34
|
def json(self, **kwargs: typing.Any) -> str:
|
|
@@ -13,6 +13,7 @@ class ConfigurableDataSourceNames(str, enum.Enum):
|
|
|
13
13
|
|
|
14
14
|
S_3 = "S3"
|
|
15
15
|
AZURE_STORAGE_BLOB = "AZURE_STORAGE_BLOB"
|
|
16
|
+
GOOGLE_DRIVE = "GOOGLE_DRIVE"
|
|
16
17
|
MICROSOFT_ONEDRIVE = "MICROSOFT_ONEDRIVE"
|
|
17
18
|
MICROSOFT_SHAREPOINT = "MICROSOFT_SHAREPOINT"
|
|
18
19
|
SLACK = "SLACK"
|
|
@@ -25,6 +26,7 @@ class ConfigurableDataSourceNames(str, enum.Enum):
|
|
|
25
26
|
self,
|
|
26
27
|
s_3: typing.Callable[[], T_Result],
|
|
27
28
|
azure_storage_blob: typing.Callable[[], T_Result],
|
|
29
|
+
google_drive: typing.Callable[[], T_Result],
|
|
28
30
|
microsoft_onedrive: typing.Callable[[], T_Result],
|
|
29
31
|
microsoft_sharepoint: typing.Callable[[], T_Result],
|
|
30
32
|
slack: typing.Callable[[], T_Result],
|
|
@@ -37,6 +39,8 @@ class ConfigurableDataSourceNames(str, enum.Enum):
|
|
|
37
39
|
return s_3()
|
|
38
40
|
if self is ConfigurableDataSourceNames.AZURE_STORAGE_BLOB:
|
|
39
41
|
return azure_storage_blob()
|
|
42
|
+
if self is ConfigurableDataSourceNames.GOOGLE_DRIVE:
|
|
43
|
+
return google_drive()
|
|
40
44
|
if self is ConfigurableDataSourceNames.MICROSOFT_ONEDRIVE:
|
|
41
45
|
return microsoft_onedrive()
|
|
42
46
|
if self is ConfigurableDataSourceNames.MICROSOFT_SHAREPOINT:
|
|
@@ -24,6 +24,7 @@ class ConfigurableTransformationNames(str, enum.Enum):
|
|
|
24
24
|
BEDROCK_EMBEDDING = "BEDROCK_EMBEDDING"
|
|
25
25
|
HUGGINGFACE_API_EMBEDDING = "HUGGINGFACE_API_EMBEDDING"
|
|
26
26
|
GEMINI_EMBEDDING = "GEMINI_EMBEDDING"
|
|
27
|
+
VERTEXAI_EMBEDDING = "VERTEXAI_EMBEDDING"
|
|
27
28
|
|
|
28
29
|
def visit(
|
|
29
30
|
self,
|
|
@@ -40,6 +41,7 @@ class ConfigurableTransformationNames(str, enum.Enum):
|
|
|
40
41
|
bedrock_embedding: typing.Callable[[], T_Result],
|
|
41
42
|
huggingface_api_embedding: typing.Callable[[], T_Result],
|
|
42
43
|
gemini_embedding: typing.Callable[[], T_Result],
|
|
44
|
+
vertexai_embedding: typing.Callable[[], T_Result],
|
|
43
45
|
) -> T_Result:
|
|
44
46
|
if self is ConfigurableTransformationNames.CHARACTER_SPLITTER:
|
|
45
47
|
return character_splitter()
|
|
@@ -67,3 +69,5 @@ class ConfigurableTransformationNames(str, enum.Enum):
|
|
|
67
69
|
return huggingface_api_embedding()
|
|
68
70
|
if self is ConfigurableTransformationNames.GEMINI_EMBEDDING:
|
|
69
71
|
return gemini_embedding()
|
|
72
|
+
if self is ConfigurableTransformationNames.VERTEXAI_EMBEDDING:
|
|
73
|
+
return vertexai_embedding()
|
|
@@ -7,6 +7,7 @@ from .bedrock_embedding import BedrockEmbedding
|
|
|
7
7
|
from .character_splitter import CharacterSplitter
|
|
8
8
|
from .code_splitter import CodeSplitter
|
|
9
9
|
from .cohere_embedding import CohereEmbedding
|
|
10
|
+
from .extend_vertex_text_embedding import ExtendVertexTextEmbedding
|
|
10
11
|
from .gemini_embedding import GeminiEmbedding
|
|
11
12
|
from .hugging_face_inference_api_embedding import HuggingFaceInferenceApiEmbedding
|
|
12
13
|
from .markdown_element_node_parser import MarkdownElementNodeParser
|
|
@@ -30,4 +31,5 @@ ConfiguredTransformationItemComponentOne = typing.Union[
|
|
|
30
31
|
BedrockEmbedding,
|
|
31
32
|
HuggingFaceInferenceApiEmbedding,
|
|
32
33
|
GeminiEmbedding,
|
|
34
|
+
ExtendVertexTextEmbedding,
|
|
33
35
|
]
|
|
@@ -5,6 +5,7 @@ import typing
|
|
|
5
5
|
from .cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
|
|
6
6
|
from .cloud_box_data_source import CloudBoxDataSource
|
|
7
7
|
from .cloud_confluence_data_source import CloudConfluenceDataSource
|
|
8
|
+
from .cloud_google_drive_data_source import CloudGoogleDriveDataSource
|
|
8
9
|
from .cloud_jira_data_source import CloudJiraDataSource
|
|
9
10
|
from .cloud_notion_page_data_source import CloudNotionPageDataSource
|
|
10
11
|
from .cloud_one_drive_data_source import CloudOneDriveDataSource
|
|
@@ -15,6 +16,7 @@ from .cloud_slack_data_source import CloudSlackDataSource
|
|
|
15
16
|
DataSourceComponentOne = typing.Union[
|
|
16
17
|
CloudS3DataSource,
|
|
17
18
|
CloudAzStorageBlobDataSource,
|
|
19
|
+
CloudGoogleDriveDataSource,
|
|
18
20
|
CloudOneDriveDataSource,
|
|
19
21
|
CloudSharepointDataSource,
|
|
20
22
|
CloudSlackDataSource,
|
|
@@ -5,6 +5,7 @@ import typing
|
|
|
5
5
|
from .cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
|
|
6
6
|
from .cloud_box_data_source import CloudBoxDataSource
|
|
7
7
|
from .cloud_confluence_data_source import CloudConfluenceDataSource
|
|
8
|
+
from .cloud_google_drive_data_source import CloudGoogleDriveDataSource
|
|
8
9
|
from .cloud_jira_data_source import CloudJiraDataSource
|
|
9
10
|
from .cloud_notion_page_data_source import CloudNotionPageDataSource
|
|
10
11
|
from .cloud_one_drive_data_source import CloudOneDriveDataSource
|
|
@@ -15,6 +16,7 @@ from .cloud_slack_data_source import CloudSlackDataSource
|
|
|
15
16
|
DataSourceCreateComponentOne = typing.Union[
|
|
16
17
|
CloudS3DataSource,
|
|
17
18
|
CloudAzStorageBlobDataSource,
|
|
19
|
+
CloudGoogleDriveDataSource,
|
|
18
20
|
CloudOneDriveDataSource,
|
|
19
21
|
CloudSharepointDataSource,
|
|
20
22
|
CloudSlackDataSource,
|
|
@@ -0,0 +1,58 @@
|
|
|
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 .vertex_embedding_mode import VertexEmbeddingMode
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
import pydantic
|
|
11
|
+
if pydantic.__version__.startswith("1."):
|
|
12
|
+
raise ImportError
|
|
13
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
14
|
+
except ImportError:
|
|
15
|
+
import pydantic # type: ignore
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ExtendVertexTextEmbedding(pydantic.BaseModel):
|
|
19
|
+
"""
|
|
20
|
+
Base class for embeddings.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
model_name: typing.Optional[str] = pydantic.Field(description="The name of the embedding model.")
|
|
24
|
+
embed_batch_size: typing.Optional[int] = pydantic.Field(description="The batch size for embedding calls.")
|
|
25
|
+
callback_manager: typing.Optional[typing.Dict[str, typing.Any]]
|
|
26
|
+
num_workers: typing.Optional[int] = pydantic.Field(
|
|
27
|
+
description="The number of workers to use for async embedding calls."
|
|
28
|
+
)
|
|
29
|
+
embed_mode: VertexEmbeddingMode = pydantic.Field(description="The embedding mode to use.")
|
|
30
|
+
additional_kwargs: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(
|
|
31
|
+
description="Additional kwargs for the Vertex."
|
|
32
|
+
)
|
|
33
|
+
client_email: typing.Optional[str] = pydantic.Field(
|
|
34
|
+
description="The client email to use when making Vertex API calls."
|
|
35
|
+
)
|
|
36
|
+
token_uri: typing.Optional[str] = pydantic.Field(description="The token uri to use when making Vertex API calls.")
|
|
37
|
+
private_key_id: typing.Optional[str] = pydantic.Field(
|
|
38
|
+
description="The private key id to use when making Vertex API calls."
|
|
39
|
+
)
|
|
40
|
+
private_key: typing.Optional[str] = pydantic.Field(
|
|
41
|
+
description="The private key to use when making Vertex API calls."
|
|
42
|
+
)
|
|
43
|
+
project: str = pydantic.Field(description="The default GCP project to use when making Vertex API calls.")
|
|
44
|
+
location: str = pydantic.Field(description="The default location to use when making API calls.")
|
|
45
|
+
class_name: typing.Optional[str]
|
|
46
|
+
|
|
47
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
48
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
49
|
+
return super().json(**kwargs_with_defaults)
|
|
50
|
+
|
|
51
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
52
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
53
|
+
return super().dict(**kwargs_with_defaults)
|
|
54
|
+
|
|
55
|
+
class Config:
|
|
56
|
+
frozen = True
|
|
57
|
+
smart_union = True
|
|
58
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -23,6 +23,7 @@ class LlamaParseParameters(pydantic.BaseModel):
|
|
|
23
23
|
languages: typing.Optional[typing.List[ParserLanguages]]
|
|
24
24
|
parsing_instruction: typing.Optional[str]
|
|
25
25
|
disable_ocr: typing.Optional[bool]
|
|
26
|
+
disable_reconstruction: typing.Optional[bool]
|
|
26
27
|
invalidate_cache: typing.Optional[bool]
|
|
27
28
|
do_not_cache: typing.Optional[bool]
|
|
28
29
|
fast_mode: typing.Optional[bool]
|
|
@@ -33,11 +34,12 @@ class LlamaParseParameters(pydantic.BaseModel):
|
|
|
33
34
|
page_separator: typing.Optional[str]
|
|
34
35
|
bounding_box: typing.Optional[str]
|
|
35
36
|
target_pages: typing.Optional[str]
|
|
36
|
-
use_vendor_multimodal_model: typing.Optional[
|
|
37
|
+
use_vendor_multimodal_model: typing.Optional[bool]
|
|
37
38
|
vendor_multimodal_model_name: typing.Optional[str]
|
|
38
39
|
vendor_multimodal_api_key: typing.Optional[str]
|
|
39
40
|
page_prefix: typing.Optional[str]
|
|
40
41
|
page_suffix: typing.Optional[str]
|
|
42
|
+
webhook_url: typing.Optional[str]
|
|
41
43
|
take_screenshot: typing.Optional[bool]
|
|
42
44
|
s_3_input_path: typing.Optional[str] = pydantic.Field(alias="s3_input_path")
|
|
43
45
|
s_3_output_path_prefix: typing.Optional[str] = pydantic.Field(alias="s3_output_path_prefix")
|
|
@@ -21,6 +21,7 @@ class LlmModelData(pydantic.BaseModel):
|
|
|
21
21
|
|
|
22
22
|
name: str = pydantic.Field(description="The name of the LLM model.")
|
|
23
23
|
description: str = pydantic.Field(description="The description of the LLM model.")
|
|
24
|
+
multi_modal: bool = pydantic.Field(description="Whether the model supports multi-modal image input")
|
|
24
25
|
|
|
25
26
|
def json(self, **kwargs: typing.Any) -> str:
|
|
26
27
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
@@ -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 .supported_llm_model_names import SupportedLlmModelNames
|
|
7
8
|
|
|
8
9
|
try:
|
|
9
10
|
import pydantic
|
|
@@ -20,7 +21,9 @@ class LlmParameters(pydantic.BaseModel):
|
|
|
20
21
|
Comes with special serialization logic for types used commonly in platform codebase.
|
|
21
22
|
"""
|
|
22
23
|
|
|
23
|
-
model_name: typing.Optional[
|
|
24
|
+
model_name: typing.Optional[SupportedLlmModelNames] = pydantic.Field(
|
|
25
|
+
description="The name of the model to use for LLM completions."
|
|
26
|
+
)
|
|
24
27
|
system_prompt: typing.Optional[str] = pydantic.Field(description="The system prompt to use for the completion.")
|
|
25
28
|
temperature: typing.Optional[float] = pydantic.Field(description="The temperature value for the model.")
|
|
26
29
|
class_name: typing.Optional[str]
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
|
10
|
+
if pydantic.__version__.startswith("1."):
|
|
11
|
+
raise ImportError
|
|
12
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
13
|
+
except ImportError:
|
|
14
|
+
import pydantic # type: ignore
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class PageScreenshotMetadata(pydantic.BaseModel):
|
|
18
|
+
page_index: int = pydantic.Field(description="The index of the page for which the screenshot is taken (0-indexed)")
|
|
19
|
+
file_id: str = pydantic.Field(description="The ID of the file that the page screenshot was taken from")
|
|
20
|
+
image_size: int = pydantic.Field(description="The size of the image in bytes")
|
|
21
|
+
|
|
22
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
24
|
+
return super().json(**kwargs_with_defaults)
|
|
25
|
+
|
|
26
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
27
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
28
|
+
return super().dict(**kwargs_with_defaults)
|
|
29
|
+
|
|
30
|
+
class Config:
|
|
31
|
+
frozen = True
|
|
32
|
+
smart_union = True
|
|
33
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 .page_screenshot_metadata import PageScreenshotMetadata
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
import pydantic
|
|
11
|
+
if pydantic.__version__.startswith("1."):
|
|
12
|
+
raise ImportError
|
|
13
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
14
|
+
except ImportError:
|
|
15
|
+
import pydantic # type: ignore
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class PageScreenshotNodeWithScore(pydantic.BaseModel):
|
|
19
|
+
"""
|
|
20
|
+
Page screenshot metadata with score
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
node: PageScreenshotMetadata
|
|
24
|
+
score: float = pydantic.Field(description="The score of the screenshot node")
|
|
25
|
+
class_name: typing.Optional[str]
|
|
26
|
+
|
|
27
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
28
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
29
|
+
return super().json(**kwargs_with_defaults)
|
|
30
|
+
|
|
31
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
32
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
33
|
+
return super().dict(**kwargs_with_defaults)
|
|
34
|
+
|
|
35
|
+
class Config:
|
|
36
|
+
frozen = True
|
|
37
|
+
smart_union = True
|
|
38
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
llama_cloud/types/pipeline.py
CHANGED
|
@@ -8,6 +8,7 @@ from .configured_transformation_item import ConfiguredTransformationItem
|
|
|
8
8
|
from .data_sink import DataSink
|
|
9
9
|
from .eval_execution_params import EvalExecutionParams
|
|
10
10
|
from .llama_parse_parameters import LlamaParseParameters
|
|
11
|
+
from .pipeline_configuration_hashes import PipelineConfigurationHashes
|
|
11
12
|
from .pipeline_embedding_config import PipelineEmbeddingConfig
|
|
12
13
|
from .pipeline_transform_config import PipelineTransformConfig
|
|
13
14
|
from .pipeline_type import PipelineType
|
|
@@ -44,6 +45,9 @@ class Pipeline(pydantic.BaseModel):
|
|
|
44
45
|
configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]] = pydantic.Field(
|
|
45
46
|
description="Deprecated don't use it, List of configured transformations."
|
|
46
47
|
)
|
|
48
|
+
config_hash: typing.Optional[PipelineConfigurationHashes] = pydantic.Field(
|
|
49
|
+
description="Hashes for the configuration of the pipeline."
|
|
50
|
+
)
|
|
47
51
|
transform_config: typing.Optional[PipelineTransformConfig] = pydantic.Field(
|
|
48
52
|
description="Configuration for the transformation."
|
|
49
53
|
)
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
|
10
|
+
if pydantic.__version__.startswith("1."):
|
|
11
|
+
raise ImportError
|
|
12
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
13
|
+
except ImportError:
|
|
14
|
+
import pydantic # type: ignore
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class PipelineConfigurationHashes(pydantic.BaseModel):
|
|
18
|
+
"""
|
|
19
|
+
Hashes for the configuration of a pipeline.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
embedding_config_hash: typing.Optional[str] = pydantic.Field(description="Hash of the embedding config.")
|
|
23
|
+
parsing_config_hash: typing.Optional[str] = pydantic.Field(description="Hash of the llama parse parameters.")
|
|
24
|
+
transform_config_hash: typing.Optional[str] = pydantic.Field(description="Hash of the transform config.")
|
|
25
|
+
|
|
26
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
27
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
28
|
+
return super().json(**kwargs_with_defaults)
|
|
29
|
+
|
|
30
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
31
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
32
|
+
return super().dict(**kwargs_with_defaults)
|
|
33
|
+
|
|
34
|
+
class Config:
|
|
35
|
+
frozen = True
|
|
36
|
+
smart_union = True
|
|
37
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -12,6 +12,7 @@ from .cohere_embedding_config import CohereEmbeddingConfig
|
|
|
12
12
|
from .gemini_embedding_config import GeminiEmbeddingConfig
|
|
13
13
|
from .hugging_face_inference_api_embedding_config import HuggingFaceInferenceApiEmbeddingConfig
|
|
14
14
|
from .open_ai_embedding_config import OpenAiEmbeddingConfig
|
|
15
|
+
from .vertex_ai_embedding_config import VertexAiEmbeddingConfig
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class PipelineCreateEmbeddingConfig_OpenaiEmbedding(OpenAiEmbeddingConfig):
|
|
@@ -68,6 +69,15 @@ class PipelineCreateEmbeddingConfig_CohereEmbedding(CohereEmbeddingConfig):
|
|
|
68
69
|
allow_population_by_field_name = True
|
|
69
70
|
|
|
70
71
|
|
|
72
|
+
class PipelineCreateEmbeddingConfig_VertexaiEmbedding(VertexAiEmbeddingConfig):
|
|
73
|
+
type: typing_extensions.Literal["VERTEXAI_EMBEDDING"]
|
|
74
|
+
|
|
75
|
+
class Config:
|
|
76
|
+
frozen = True
|
|
77
|
+
smart_union = True
|
|
78
|
+
allow_population_by_field_name = True
|
|
79
|
+
|
|
80
|
+
|
|
71
81
|
PipelineCreateEmbeddingConfig = typing.Union[
|
|
72
82
|
PipelineCreateEmbeddingConfig_OpenaiEmbedding,
|
|
73
83
|
PipelineCreateEmbeddingConfig_AzureEmbedding,
|
|
@@ -75,4 +85,5 @@ PipelineCreateEmbeddingConfig = typing.Union[
|
|
|
75
85
|
PipelineCreateEmbeddingConfig_BedrockEmbedding,
|
|
76
86
|
PipelineCreateEmbeddingConfig_GeminiEmbedding,
|
|
77
87
|
PipelineCreateEmbeddingConfig_CohereEmbedding,
|
|
88
|
+
PipelineCreateEmbeddingConfig_VertexaiEmbedding,
|
|
78
89
|
]
|
|
@@ -5,6 +5,7 @@ import typing
|
|
|
5
5
|
from .cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
|
|
6
6
|
from .cloud_box_data_source import CloudBoxDataSource
|
|
7
7
|
from .cloud_confluence_data_source import CloudConfluenceDataSource
|
|
8
|
+
from .cloud_google_drive_data_source import CloudGoogleDriveDataSource
|
|
8
9
|
from .cloud_jira_data_source import CloudJiraDataSource
|
|
9
10
|
from .cloud_notion_page_data_source import CloudNotionPageDataSource
|
|
10
11
|
from .cloud_one_drive_data_source import CloudOneDriveDataSource
|
|
@@ -15,6 +16,7 @@ from .cloud_slack_data_source import CloudSlackDataSource
|
|
|
15
16
|
PipelineDataSourceComponentOne = typing.Union[
|
|
16
17
|
CloudS3DataSource,
|
|
17
18
|
CloudAzStorageBlobDataSource,
|
|
19
|
+
CloudGoogleDriveDataSource,
|
|
18
20
|
CloudOneDriveDataSource,
|
|
19
21
|
CloudSharepointDataSource,
|
|
20
22
|
CloudSlackDataSource,
|
|
@@ -12,6 +12,7 @@ from .cohere_embedding_config import CohereEmbeddingConfig
|
|
|
12
12
|
from .gemini_embedding_config import GeminiEmbeddingConfig
|
|
13
13
|
from .hugging_face_inference_api_embedding_config import HuggingFaceInferenceApiEmbeddingConfig
|
|
14
14
|
from .open_ai_embedding_config import OpenAiEmbeddingConfig
|
|
15
|
+
from .vertex_ai_embedding_config import VertexAiEmbeddingConfig
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class PipelineEmbeddingConfig_OpenaiEmbedding(OpenAiEmbeddingConfig):
|
|
@@ -68,6 +69,15 @@ class PipelineEmbeddingConfig_CohereEmbedding(CohereEmbeddingConfig):
|
|
|
68
69
|
allow_population_by_field_name = True
|
|
69
70
|
|
|
70
71
|
|
|
72
|
+
class PipelineEmbeddingConfig_VertexaiEmbedding(VertexAiEmbeddingConfig):
|
|
73
|
+
type: typing_extensions.Literal["VERTEXAI_EMBEDDING"]
|
|
74
|
+
|
|
75
|
+
class Config:
|
|
76
|
+
frozen = True
|
|
77
|
+
smart_union = True
|
|
78
|
+
allow_population_by_field_name = True
|
|
79
|
+
|
|
80
|
+
|
|
71
81
|
PipelineEmbeddingConfig = typing.Union[
|
|
72
82
|
PipelineEmbeddingConfig_OpenaiEmbedding,
|
|
73
83
|
PipelineEmbeddingConfig_AzureEmbedding,
|
|
@@ -75,4 +85,5 @@ PipelineEmbeddingConfig = typing.Union[
|
|
|
75
85
|
PipelineEmbeddingConfig_BedrockEmbedding,
|
|
76
86
|
PipelineEmbeddingConfig_GeminiEmbedding,
|
|
77
87
|
PipelineEmbeddingConfig_CohereEmbedding,
|
|
88
|
+
PipelineEmbeddingConfig_VertexaiEmbedding,
|
|
78
89
|
]
|
|
@@ -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 .pipeline_file_config_hash_value import PipelineFileConfigHashValue
|
|
7
8
|
from .pipeline_file_custom_metadata_value import PipelineFileCustomMetadataValue
|
|
8
9
|
from .pipeline_file_resource_info_value import PipelineFileResourceInfoValue
|
|
9
10
|
|
|
@@ -40,6 +41,9 @@ class PipelineFile(pydantic.BaseModel):
|
|
|
40
41
|
custom_metadata: typing.Optional[typing.Dict[str, PipelineFileCustomMetadataValue]] = pydantic.Field(
|
|
41
42
|
description="Custom metadata for the file"
|
|
42
43
|
)
|
|
44
|
+
config_hash: typing.Optional[typing.Dict[str, PipelineFileConfigHashValue]] = pydantic.Field(
|
|
45
|
+
description="Hashes for the configuration of the pipeline."
|
|
46
|
+
)
|
|
43
47
|
|
|
44
48
|
def json(self, **kwargs: typing.Any) -> str:
|
|
45
49
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
@@ -33,6 +33,7 @@ class PresetRetrievalParams(pydantic.BaseModel):
|
|
|
33
33
|
description="Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content)."
|
|
34
34
|
)
|
|
35
35
|
retrieval_mode: typing.Optional[RetrievalMode] = pydantic.Field(description="The retrieval mode for the query.")
|
|
36
|
+
retrieve_image_nodes: typing.Optional[bool] = pydantic.Field(description="Whether to retrieve image nodes.")
|
|
36
37
|
|
|
37
38
|
def json(self, **kwargs: typing.Any) -> str:
|
|
38
39
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
@@ -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 .page_screenshot_node_with_score import PageScreenshotNodeWithScore
|
|
7
8
|
from .text_node_with_score import TextNodeWithScore
|
|
8
9
|
|
|
9
10
|
try:
|
|
@@ -24,6 +25,9 @@ class RetrieveResults(pydantic.BaseModel):
|
|
|
24
25
|
retrieval_nodes: typing.List[TextNodeWithScore] = pydantic.Field(
|
|
25
26
|
description="The nodes retrieved by the pipeline for the given query."
|
|
26
27
|
)
|
|
28
|
+
image_nodes: typing.Optional[typing.List[PageScreenshotNodeWithScore]] = pydantic.Field(
|
|
29
|
+
description="The image nodes retrieved by the pipeline for the given query."
|
|
30
|
+
)
|
|
27
31
|
retrieval_latency: typing.Dict[str, float] = pydantic.Field(
|
|
28
32
|
description="The end-to-end latency for retrieval and reranking."
|
|
29
33
|
)
|