llama-cloud 0.0.17__py3-none-any.whl → 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of llama-cloud might be problematic. Click here for more details.
- llama_cloud/__init__.py +8 -36
- llama_cloud/client.py +0 -3
- llama_cloud/resources/__init__.py +2 -10
- llama_cloud/resources/data_sinks/__init__.py +2 -2
- llama_cloud/resources/data_sinks/client.py +8 -8
- llama_cloud/resources/data_sinks/types/__init__.py +1 -2
- llama_cloud/resources/data_sinks/types/data_sink_update_component.py +15 -2
- llama_cloud/resources/data_sources/__init__.py +2 -2
- llama_cloud/resources/data_sources/client.py +6 -6
- llama_cloud/resources/data_sources/types/__init__.py +1 -2
- llama_cloud/resources/data_sources/types/data_source_update_component.py +23 -2
- llama_cloud/resources/extraction/client.py +14 -14
- llama_cloud/resources/files/client.py +10 -10
- llama_cloud/resources/organizations/client.py +2 -2
- llama_cloud/resources/parsing/client.py +100 -60
- llama_cloud/resources/pipelines/__init__.py +0 -4
- llama_cloud/resources/pipelines/client.py +50 -340
- llama_cloud/resources/pipelines/types/__init__.py +1 -7
- llama_cloud/resources/pipelines/types/pipeline_update_embedding_config.py +15 -15
- llama_cloud/resources/pipelines/types/pipeline_update_transform_config.py +1 -24
- llama_cloud/types/__init__.py +9 -29
- llama_cloud/types/azure_open_ai_embedding.py +7 -39
- llama_cloud/types/base_prompt_template.py +3 -14
- llama_cloud/types/bedrock_embedding.py +7 -20
- llama_cloud/types/box_auth_mechanism.py +0 -4
- llama_cloud/types/character_splitter.py +3 -4
- llama_cloud/types/chat_data.py +0 -5
- llama_cloud/types/chat_message.py +1 -6
- llama_cloud/types/cloud_az_storage_blob_data_source.py +7 -18
- llama_cloud/types/cloud_box_data_source.py +6 -16
- llama_cloud/types/cloud_confluence_data_source.py +6 -10
- llama_cloud/types/cloud_document.py +1 -3
- llama_cloud/types/cloud_document_create.py +1 -3
- llama_cloud/types/cloud_google_drive_data_source.py +0 -4
- llama_cloud/types/cloud_jira_data_source.py +4 -6
- llama_cloud/types/cloud_notion_page_data_source.py +2 -6
- llama_cloud/types/cloud_one_drive_data_source.py +2 -6
- llama_cloud/types/cloud_pinecone_vector_store.py +1 -1
- llama_cloud/types/cloud_postgres_vector_store.py +0 -4
- llama_cloud/types/cloud_s_3_data_source.py +4 -12
- llama_cloud/types/cloud_sharepoint_data_source.py +5 -9
- llama_cloud/types/cloud_slack_data_source.py +6 -10
- llama_cloud/types/code_splitter.py +2 -1
- llama_cloud/types/cohere_embedding.py +6 -15
- llama_cloud/types/configurable_data_sink_names.py +0 -12
- llama_cloud/types/configurable_data_source_names.py +0 -4
- llama_cloud/types/configurable_transformation_names.py +0 -32
- llama_cloud/types/configured_transformation_item_component.py +15 -2
- llama_cloud/types/data_sink.py +2 -2
- llama_cloud/types/data_sink_component.py +15 -2
- llama_cloud/types/data_sink_create_component.py +15 -2
- llama_cloud/types/data_source.py +3 -5
- llama_cloud/types/data_source_component.py +23 -2
- llama_cloud/types/data_source_create.py +1 -3
- llama_cloud/types/data_source_create_component.py +23 -2
- llama_cloud/types/eval_dataset.py +2 -2
- llama_cloud/types/eval_dataset_job_record.py +7 -13
- llama_cloud/types/eval_execution_params_override.py +2 -6
- llama_cloud/types/eval_metric.py +17 -0
- llama_cloud/types/eval_question.py +2 -6
- llama_cloud/types/extraction_result.py +5 -3
- llama_cloud/types/extraction_schema.py +3 -5
- llama_cloud/types/file.py +7 -11
- llama_cloud/types/gemini_embedding.py +7 -22
- llama_cloud/types/hugging_face_inference_api_embedding.py +9 -34
- llama_cloud/types/input_message.py +2 -4
- llama_cloud/types/llama_parse_parameters.py +5 -0
- llama_cloud/types/llama_parse_supported_file_extensions.py +0 -4
- llama_cloud/types/llm.py +9 -8
- llama_cloud/types/llm_parameters.py +2 -7
- llama_cloud/types/local_eval.py +8 -10
- llama_cloud/types/local_eval_results.py +1 -1
- llama_cloud/types/managed_ingestion_status_response.py +3 -5
- llama_cloud/types/markdown_element_node_parser.py +4 -5
- llama_cloud/types/markdown_node_parser.py +2 -1
- llama_cloud/types/message_annotation.py +1 -6
- llama_cloud/types/metric_result.py +3 -3
- llama_cloud/types/node_parser.py +2 -1
- llama_cloud/types/node_relationship.py +44 -0
- llama_cloud/types/object_type.py +0 -4
- llama_cloud/types/open_ai_embedding.py +7 -36
- llama_cloud/types/organization.py +2 -2
- llama_cloud/types/page_splitter_node_parser.py +3 -2
- llama_cloud/types/parsing_job_json_result.py +2 -2
- llama_cloud/types/parsing_job_markdown_result.py +1 -1
- llama_cloud/types/parsing_job_text_result.py +1 -1
- llama_cloud/types/partition_names.py +45 -0
- llama_cloud/types/pipeline.py +7 -17
- llama_cloud/types/pipeline_configuration_hashes.py +3 -3
- llama_cloud/types/pipeline_create.py +6 -18
- llama_cloud/types/pipeline_create_embedding_config.py +15 -15
- llama_cloud/types/pipeline_create_transform_config.py +1 -24
- llama_cloud/types/pipeline_data_source.py +5 -11
- llama_cloud/types/pipeline_data_source_component.py +23 -2
- llama_cloud/types/pipeline_data_source_create.py +1 -3
- llama_cloud/types/pipeline_deployment.py +4 -8
- llama_cloud/types/pipeline_embedding_config.py +15 -15
- llama_cloud/types/pipeline_file.py +10 -18
- llama_cloud/types/pipeline_file_create.py +1 -3
- llama_cloud/types/playground_session.py +2 -2
- llama_cloud/types/preset_retrieval_params.py +8 -11
- llama_cloud/types/presigned_url.py +1 -3
- llama_cloud/types/project.py +2 -2
- llama_cloud/types/prompt_mixin_prompts.py +1 -1
- llama_cloud/types/prompt_spec.py +2 -4
- llama_cloud/types/related_node_info.py +0 -4
- llama_cloud/types/retrieval_mode.py +0 -4
- llama_cloud/types/sentence_splitter.py +3 -4
- llama_cloud/types/supported_llm_model_names.py +0 -4
- llama_cloud/types/text_node.py +3 -9
- llama_cloud/types/token_text_splitter.py +2 -1
- llama_cloud/types/transformation_category_names.py +0 -4
- llama_cloud/types/user_organization.py +5 -9
- llama_cloud/types/user_organization_create.py +2 -2
- llama_cloud/types/user_organization_delete.py +2 -2
- llama_cloud/types/vertex_ai_embedding_config.py +2 -2
- llama_cloud/types/{extend_vertex_text_embedding.py → vertex_text_embedding.py} +10 -23
- {llama_cloud-0.0.17.dist-info → llama_cloud-0.1.1.dist-info}/METADATA +1 -1
- llama_cloud-0.1.1.dist-info/RECORD +224 -0
- llama_cloud/resources/auth/__init__.py +0 -2
- llama_cloud/resources/auth/client.py +0 -124
- llama_cloud/resources/data_sinks/types/data_sink_update_component_one.py +0 -23
- llama_cloud/resources/data_sources/types/data_source_update_component_one.py +0 -27
- llama_cloud/types/cloud_chroma_vector_store.py +0 -43
- llama_cloud/types/cloud_weaviate_vector_store.py +0 -41
- llama_cloud/types/configured_transformation_item_component_one.py +0 -35
- llama_cloud/types/custom_claims.py +0 -58
- llama_cloud/types/data_sink_component_one.py +0 -23
- llama_cloud/types/data_sink_create_component_one.py +0 -23
- llama_cloud/types/data_source_component_one.py +0 -27
- llama_cloud/types/data_source_create_component_one.py +0 -27
- llama_cloud/types/pipeline_data_source_component_one.py +0 -27
- llama_cloud/types/user.py +0 -35
- llama_cloud-0.0.17.dist-info/RECORD +0 -235
- {llama_cloud-0.0.17.dist-info → llama_cloud-0.1.1.dist-info}/LICENSE +0 -0
- {llama_cloud-0.0.17.dist-info → llama_cloud-0.1.1.dist-info}/WHEEL +0 -0
|
@@ -15,13 +15,9 @@ except ImportError:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class CloudOneDriveDataSource(pydantic.BaseModel):
|
|
18
|
-
"""
|
|
19
|
-
Base component object to capture class names.
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
18
|
user_principal_name: str = pydantic.Field(description="The user principal name to use for authentication.")
|
|
23
|
-
folder_path: typing.Optional[str]
|
|
24
|
-
folder_id: typing.Optional[str]
|
|
19
|
+
folder_path: typing.Optional[str]
|
|
20
|
+
folder_id: typing.Optional[str]
|
|
25
21
|
client_id: str = pydantic.Field(description="The client ID to use for authentication.")
|
|
26
22
|
client_secret: str = pydantic.Field(description="The client secret to use for authentication.")
|
|
27
23
|
tenant_id: str = pydantic.Field(description="The tenant ID to use for authentication.")
|
|
@@ -29,7 +29,7 @@ class CloudPineconeVectorStore(pydantic.BaseModel):
|
|
|
29
29
|
"""
|
|
30
30
|
|
|
31
31
|
supports_nested_metadata_filters: typing.Optional[bool]
|
|
32
|
-
api_key: str
|
|
32
|
+
api_key: str = pydantic.Field(description="The API key for authenticating with Pinecone")
|
|
33
33
|
index_name: str
|
|
34
34
|
namespace: typing.Optional[str]
|
|
35
35
|
insert_kwargs: typing.Optional[typing.Dict[str, typing.Any]]
|
|
@@ -15,19 +15,11 @@ except ImportError:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class CloudS3DataSource(pydantic.BaseModel):
|
|
18
|
-
"""
|
|
19
|
-
Base component object to capture class names.
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
18
|
bucket: str = pydantic.Field(description="The name of the S3 bucket to read from.")
|
|
23
|
-
prefix: typing.Optional[str]
|
|
24
|
-
aws_access_id: typing.Optional[str]
|
|
25
|
-
aws_access_secret: typing.Optional[str]
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
s_3_endpoint_url: typing.Optional[str] = pydantic.Field(
|
|
29
|
-
alias="s3_endpoint_url", description="The S3 endpoint URL to use for authentication."
|
|
30
|
-
)
|
|
19
|
+
prefix: typing.Optional[str]
|
|
20
|
+
aws_access_id: typing.Optional[str]
|
|
21
|
+
aws_access_secret: typing.Optional[str]
|
|
22
|
+
s_3_endpoint_url: typing.Optional[str] = pydantic.Field(alias="s3_endpoint_url")
|
|
31
23
|
class_name: typing.Optional[str]
|
|
32
24
|
|
|
33
25
|
def json(self, **kwargs: typing.Any) -> str:
|
|
@@ -15,15 +15,11 @@ except ImportError:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class CloudSharepointDataSource(pydantic.BaseModel):
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
site_id: typing.Optional[str] = pydantic.Field(description="The ID of the SharePoint site to download from.")
|
|
24
|
-
folder_path: typing.Optional[str] = pydantic.Field(description="The path of the Sharepoint folder to read from.")
|
|
25
|
-
folder_id: typing.Optional[str] = pydantic.Field(description="The ID of the Sharepoint folder to read from.")
|
|
26
|
-
drive_name: typing.Optional[str] = pydantic.Field(description="The name of the Sharepoint drive to read from.")
|
|
18
|
+
site_name: typing.Optional[str]
|
|
19
|
+
site_id: typing.Optional[str]
|
|
20
|
+
folder_path: typing.Optional[str]
|
|
21
|
+
folder_id: typing.Optional[str]
|
|
22
|
+
drive_name: typing.Optional[str]
|
|
27
23
|
client_id: str = pydantic.Field(description="The client ID to use for authentication.")
|
|
28
24
|
client_secret: str = pydantic.Field(description="The client secret to use for authentication.")
|
|
29
25
|
tenant_id: str = pydantic.Field(description="The tenant ID to use for authentication.")
|
|
@@ -15,17 +15,13 @@ except ImportError:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class CloudSlackDataSource(pydantic.BaseModel):
|
|
18
|
-
"""
|
|
19
|
-
Base component object to capture class names.
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
18
|
slack_token: str = pydantic.Field(description="Slack Bot Token.")
|
|
23
|
-
channel_ids: typing.Optional[str]
|
|
24
|
-
latest_date: typing.Optional[str]
|
|
25
|
-
earliest_date: typing.Optional[str]
|
|
26
|
-
earliest_date_timestamp: typing.Optional[float]
|
|
27
|
-
latest_date_timestamp: typing.Optional[float]
|
|
28
|
-
channel_patterns: typing.Optional[str]
|
|
19
|
+
channel_ids: typing.Optional[str]
|
|
20
|
+
latest_date: typing.Optional[str]
|
|
21
|
+
earliest_date: typing.Optional[str]
|
|
22
|
+
earliest_date_timestamp: typing.Optional[float]
|
|
23
|
+
latest_date_timestamp: typing.Optional[float]
|
|
24
|
+
channel_patterns: typing.Optional[str]
|
|
29
25
|
class_name: typing.Optional[str]
|
|
30
26
|
|
|
31
27
|
def json(self, **kwargs: typing.Any) -> str:
|
|
@@ -26,7 +26,8 @@ class CodeSplitter(pydantic.BaseModel):
|
|
|
26
26
|
description="Whether or not to consider metadata when splitting."
|
|
27
27
|
)
|
|
28
28
|
include_prev_next_rel: typing.Optional[bool] = pydantic.Field(description="Include prev/next node relationships.")
|
|
29
|
-
callback_manager: typing.Optional[typing.
|
|
29
|
+
callback_manager: typing.Optional[typing.Any]
|
|
30
|
+
id_func: typing.Optional[str]
|
|
30
31
|
language: str = pydantic.Field(description="The programming language of the code being split.")
|
|
31
32
|
chunk_lines: typing.Optional[int] = pydantic.Field(description="The number of lines to include in each chunk.")
|
|
32
33
|
chunk_lines_overlap: typing.Optional[int] = pydantic.Field(
|
|
@@ -15,22 +15,13 @@ except ImportError:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class CohereEmbedding(pydantic.BaseModel):
|
|
18
|
-
""
|
|
19
|
-
CohereEmbedding uses the Cohere API to generate embeddings for text.
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
model_name: typing.Optional[str] = pydantic.Field(description="The name of the embedding model.")
|
|
18
|
+
model_name: typing.Optional[str] = pydantic.Field(description="The modelId of the Cohere model to use.")
|
|
23
19
|
embed_batch_size: typing.Optional[int] = pydantic.Field(description="The batch size for embedding calls.")
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
truncate: str = pydantic.Field(description="Truncation type - START/ END/ NONE")
|
|
30
|
-
input_type: typing.Optional[str] = pydantic.Field(
|
|
31
|
-
description="Model Input type. If not provided, search_document and search_query are used when needed."
|
|
32
|
-
)
|
|
33
|
-
embedding_type: str = pydantic.Field(
|
|
20
|
+
num_workers: typing.Optional[int]
|
|
21
|
+
api_key: typing.Optional[str]
|
|
22
|
+
truncate: typing.Optional[str] = pydantic.Field(description="Truncation type - START/ END/ NONE")
|
|
23
|
+
input_type: typing.Optional[str]
|
|
24
|
+
embedding_type: typing.Optional[str] = pydantic.Field(
|
|
34
25
|
description="Embedding type. If not provided float embedding_type is used when needed."
|
|
35
26
|
)
|
|
36
27
|
class_name: typing.Optional[str]
|
|
@@ -7,40 +7,28 @@ T_Result = typing.TypeVar("T_Result")
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ConfigurableDataSinkNames(str, enum.Enum):
|
|
10
|
-
"""
|
|
11
|
-
An enumeration.
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
CHROMA = "CHROMA"
|
|
15
10
|
PINECONE = "PINECONE"
|
|
16
11
|
POSTGRES = "POSTGRES"
|
|
17
12
|
QDRANT = "QDRANT"
|
|
18
|
-
WEAVIATE = "WEAVIATE"
|
|
19
13
|
AZUREAI_SEARCH = "AZUREAI_SEARCH"
|
|
20
14
|
MONGODB_ATLAS = "MONGODB_ATLAS"
|
|
21
15
|
MILVUS = "MILVUS"
|
|
22
16
|
|
|
23
17
|
def visit(
|
|
24
18
|
self,
|
|
25
|
-
chroma: typing.Callable[[], T_Result],
|
|
26
19
|
pinecone: typing.Callable[[], T_Result],
|
|
27
20
|
postgres: typing.Callable[[], T_Result],
|
|
28
21
|
qdrant: typing.Callable[[], T_Result],
|
|
29
|
-
weaviate: typing.Callable[[], T_Result],
|
|
30
22
|
azureai_search: typing.Callable[[], T_Result],
|
|
31
23
|
mongodb_atlas: typing.Callable[[], T_Result],
|
|
32
24
|
milvus: typing.Callable[[], T_Result],
|
|
33
25
|
) -> T_Result:
|
|
34
|
-
if self is ConfigurableDataSinkNames.CHROMA:
|
|
35
|
-
return chroma()
|
|
36
26
|
if self is ConfigurableDataSinkNames.PINECONE:
|
|
37
27
|
return pinecone()
|
|
38
28
|
if self is ConfigurableDataSinkNames.POSTGRES:
|
|
39
29
|
return postgres()
|
|
40
30
|
if self is ConfigurableDataSinkNames.QDRANT:
|
|
41
31
|
return qdrant()
|
|
42
|
-
if self is ConfigurableDataSinkNames.WEAVIATE:
|
|
43
|
-
return weaviate()
|
|
44
32
|
if self is ConfigurableDataSinkNames.AZUREAI_SEARCH:
|
|
45
33
|
return azureai_search()
|
|
46
34
|
if self is ConfigurableDataSinkNames.MONGODB_ATLAS:
|
|
@@ -7,10 +7,6 @@ T_Result = typing.TypeVar("T_Result")
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ConfigurableTransformationNames(str, enum.Enum):
|
|
10
|
-
"""
|
|
11
|
-
An enumeration.
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
10
|
CHARACTER_SPLITTER = "CHARACTER_SPLITTER"
|
|
15
11
|
PAGE_SPLITTER_NODE_PARSER = "PAGE_SPLITTER_NODE_PARSER"
|
|
16
12
|
CODE_NODE_PARSER = "CODE_NODE_PARSER"
|
|
@@ -18,13 +14,6 @@ class ConfigurableTransformationNames(str, enum.Enum):
|
|
|
18
14
|
TOKEN_AWARE_NODE_PARSER = "TOKEN_AWARE_NODE_PARSER"
|
|
19
15
|
MARKDOWN_NODE_PARSER = "MARKDOWN_NODE_PARSER"
|
|
20
16
|
MARKDOWN_ELEMENT_NODE_PARSER = "MARKDOWN_ELEMENT_NODE_PARSER"
|
|
21
|
-
OPENAI_EMBEDDING = "OPENAI_EMBEDDING"
|
|
22
|
-
AZURE_EMBEDDING = "AZURE_EMBEDDING"
|
|
23
|
-
COHERE_EMBEDDING = "COHERE_EMBEDDING"
|
|
24
|
-
BEDROCK_EMBEDDING = "BEDROCK_EMBEDDING"
|
|
25
|
-
HUGGINGFACE_API_EMBEDDING = "HUGGINGFACE_API_EMBEDDING"
|
|
26
|
-
GEMINI_EMBEDDING = "GEMINI_EMBEDDING"
|
|
27
|
-
VERTEXAI_EMBEDDING = "VERTEXAI_EMBEDDING"
|
|
28
17
|
|
|
29
18
|
def visit(
|
|
30
19
|
self,
|
|
@@ -35,13 +24,6 @@ class ConfigurableTransformationNames(str, enum.Enum):
|
|
|
35
24
|
token_aware_node_parser: typing.Callable[[], T_Result],
|
|
36
25
|
markdown_node_parser: typing.Callable[[], T_Result],
|
|
37
26
|
markdown_element_node_parser: typing.Callable[[], T_Result],
|
|
38
|
-
openai_embedding: typing.Callable[[], T_Result],
|
|
39
|
-
azure_embedding: typing.Callable[[], T_Result],
|
|
40
|
-
cohere_embedding: typing.Callable[[], T_Result],
|
|
41
|
-
bedrock_embedding: typing.Callable[[], T_Result],
|
|
42
|
-
huggingface_api_embedding: typing.Callable[[], T_Result],
|
|
43
|
-
gemini_embedding: typing.Callable[[], T_Result],
|
|
44
|
-
vertexai_embedding: typing.Callable[[], T_Result],
|
|
45
27
|
) -> T_Result:
|
|
46
28
|
if self is ConfigurableTransformationNames.CHARACTER_SPLITTER:
|
|
47
29
|
return character_splitter()
|
|
@@ -57,17 +39,3 @@ class ConfigurableTransformationNames(str, enum.Enum):
|
|
|
57
39
|
return markdown_node_parser()
|
|
58
40
|
if self is ConfigurableTransformationNames.MARKDOWN_ELEMENT_NODE_PARSER:
|
|
59
41
|
return markdown_element_node_parser()
|
|
60
|
-
if self is ConfigurableTransformationNames.OPENAI_EMBEDDING:
|
|
61
|
-
return openai_embedding()
|
|
62
|
-
if self is ConfigurableTransformationNames.AZURE_EMBEDDING:
|
|
63
|
-
return azure_embedding()
|
|
64
|
-
if self is ConfigurableTransformationNames.COHERE_EMBEDDING:
|
|
65
|
-
return cohere_embedding()
|
|
66
|
-
if self is ConfigurableTransformationNames.BEDROCK_EMBEDDING:
|
|
67
|
-
return bedrock_embedding()
|
|
68
|
-
if self is ConfigurableTransformationNames.HUGGINGFACE_API_EMBEDDING:
|
|
69
|
-
return huggingface_api_embedding()
|
|
70
|
-
if self is ConfigurableTransformationNames.GEMINI_EMBEDDING:
|
|
71
|
-
return gemini_embedding()
|
|
72
|
-
if self is ConfigurableTransformationNames.VERTEXAI_EMBEDDING:
|
|
73
|
-
return vertexai_embedding()
|
|
@@ -2,8 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
|
-
from .
|
|
5
|
+
from .character_splitter import CharacterSplitter
|
|
6
|
+
from .code_splitter import CodeSplitter
|
|
7
|
+
from .markdown_element_node_parser import MarkdownElementNodeParser
|
|
8
|
+
from .markdown_node_parser import MarkdownNodeParser
|
|
9
|
+
from .page_splitter_node_parser import PageSplitterNodeParser
|
|
10
|
+
from .sentence_splitter import SentenceSplitter
|
|
11
|
+
from .token_text_splitter import TokenTextSplitter
|
|
6
12
|
|
|
7
13
|
ConfiguredTransformationItemComponent = typing.Union[
|
|
8
|
-
typing.Dict[str, typing.Any],
|
|
14
|
+
typing.Dict[str, typing.Any],
|
|
15
|
+
CharacterSplitter,
|
|
16
|
+
PageSplitterNodeParser,
|
|
17
|
+
CodeSplitter,
|
|
18
|
+
SentenceSplitter,
|
|
19
|
+
TokenTextSplitter,
|
|
20
|
+
MarkdownNodeParser,
|
|
21
|
+
MarkdownElementNodeParser,
|
|
9
22
|
]
|
llama_cloud/types/data_sink.py
CHANGED
|
@@ -22,8 +22,8 @@ class DataSink(pydantic.BaseModel):
|
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
24
|
id: str = pydantic.Field(description="Unique identifier")
|
|
25
|
-
created_at: typing.Optional[dt.datetime]
|
|
26
|
-
updated_at: typing.Optional[dt.datetime]
|
|
25
|
+
created_at: typing.Optional[dt.datetime]
|
|
26
|
+
updated_at: typing.Optional[dt.datetime]
|
|
27
27
|
name: str = pydantic.Field(description="The name of the data sink.")
|
|
28
28
|
sink_type: ConfigurableDataSinkNames
|
|
29
29
|
component: DataSinkComponent
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
|
-
from .
|
|
5
|
+
from .cloud_azure_ai_search_vector_store import CloudAzureAiSearchVectorStore
|
|
6
|
+
from .cloud_milvus_vector_store import CloudMilvusVectorStore
|
|
7
|
+
from .cloud_mongo_db_atlas_vector_search import CloudMongoDbAtlasVectorSearch
|
|
8
|
+
from .cloud_pinecone_vector_store import CloudPineconeVectorStore
|
|
9
|
+
from .cloud_postgres_vector_store import CloudPostgresVectorStore
|
|
10
|
+
from .cloud_qdrant_vector_store import CloudQdrantVectorStore
|
|
6
11
|
|
|
7
|
-
DataSinkComponent = typing.Union[
|
|
12
|
+
DataSinkComponent = typing.Union[
|
|
13
|
+
typing.Dict[str, typing.Any],
|
|
14
|
+
CloudPineconeVectorStore,
|
|
15
|
+
CloudPostgresVectorStore,
|
|
16
|
+
CloudQdrantVectorStore,
|
|
17
|
+
CloudAzureAiSearchVectorStore,
|
|
18
|
+
CloudMongoDbAtlasVectorSearch,
|
|
19
|
+
CloudMilvusVectorStore,
|
|
20
|
+
]
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
|
-
from .
|
|
5
|
+
from .cloud_azure_ai_search_vector_store import CloudAzureAiSearchVectorStore
|
|
6
|
+
from .cloud_milvus_vector_store import CloudMilvusVectorStore
|
|
7
|
+
from .cloud_mongo_db_atlas_vector_search import CloudMongoDbAtlasVectorSearch
|
|
8
|
+
from .cloud_pinecone_vector_store import CloudPineconeVectorStore
|
|
9
|
+
from .cloud_postgres_vector_store import CloudPostgresVectorStore
|
|
10
|
+
from .cloud_qdrant_vector_store import CloudQdrantVectorStore
|
|
6
11
|
|
|
7
|
-
DataSinkCreateComponent = typing.Union[
|
|
12
|
+
DataSinkCreateComponent = typing.Union[
|
|
13
|
+
typing.Dict[str, typing.Any],
|
|
14
|
+
CloudPineconeVectorStore,
|
|
15
|
+
CloudPostgresVectorStore,
|
|
16
|
+
CloudQdrantVectorStore,
|
|
17
|
+
CloudAzureAiSearchVectorStore,
|
|
18
|
+
CloudMongoDbAtlasVectorSearch,
|
|
19
|
+
CloudMilvusVectorStore,
|
|
20
|
+
]
|
llama_cloud/types/data_source.py
CHANGED
|
@@ -23,13 +23,11 @@ class DataSource(pydantic.BaseModel):
|
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
25
|
id: str = pydantic.Field(description="Unique identifier")
|
|
26
|
-
created_at: typing.Optional[dt.datetime]
|
|
27
|
-
updated_at: typing.Optional[dt.datetime]
|
|
26
|
+
created_at: typing.Optional[dt.datetime]
|
|
27
|
+
updated_at: typing.Optional[dt.datetime]
|
|
28
28
|
name: str = pydantic.Field(description="The name of the data source.")
|
|
29
29
|
source_type: ConfigurableDataSourceNames
|
|
30
|
-
custom_metadata: typing.Optional[typing.Dict[str, DataSourceCustomMetadataValue]]
|
|
31
|
-
description="Custom metadata that will be present on all data loaded from the data source"
|
|
32
|
-
)
|
|
30
|
+
custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[DataSourceCustomMetadataValue]]]
|
|
33
31
|
component: DataSourceComponent
|
|
34
32
|
project_id: str
|
|
35
33
|
|
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
|
-
from .
|
|
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
|
|
6
15
|
|
|
7
|
-
DataSourceComponent = typing.Union[
|
|
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
|
+
]
|
|
@@ -24,9 +24,7 @@ class DataSourceCreate(pydantic.BaseModel):
|
|
|
24
24
|
|
|
25
25
|
name: str = pydantic.Field(description="The name of the data source.")
|
|
26
26
|
source_type: ConfigurableDataSourceNames
|
|
27
|
-
custom_metadata: typing.Optional[typing.Dict[str, DataSourceCreateCustomMetadataValue]]
|
|
28
|
-
description="Custom metadata that will be present on all data loaded from the data source"
|
|
29
|
-
)
|
|
27
|
+
custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[DataSourceCreateCustomMetadataValue]]]
|
|
30
28
|
component: DataSourceCreateComponent
|
|
31
29
|
|
|
32
30
|
def json(self, **kwargs: typing.Any) -> str:
|
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
|
-
from .
|
|
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
|
|
6
15
|
|
|
7
|
-
DataSourceCreateComponent = typing.Union[
|
|
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
|
+
]
|
|
@@ -21,8 +21,8 @@ class EvalDataset(pydantic.BaseModel):
|
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
23
|
id: str = pydantic.Field(description="Unique identifier")
|
|
24
|
-
created_at: typing.Optional[dt.datetime]
|
|
25
|
-
updated_at: typing.Optional[dt.datetime]
|
|
24
|
+
created_at: typing.Optional[dt.datetime]
|
|
25
|
+
updated_at: typing.Optional[dt.datetime]
|
|
26
26
|
name: str = pydantic.Field(description="The name of the EvalDataset.")
|
|
27
27
|
project_id: str
|
|
28
28
|
|
|
@@ -28,27 +28,21 @@ class EvalDatasetJobRecord(pydantic.BaseModel):
|
|
|
28
28
|
partitions: typing.Dict[str, str] = pydantic.Field(
|
|
29
29
|
description="The partitions for this execution. Used for determining where to save job output."
|
|
30
30
|
)
|
|
31
|
-
parameters: typing.Optional[EvalDatasetJobParams]
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
)
|
|
37
|
-
correlation_id: typing.Optional[str] = pydantic.Field(
|
|
38
|
-
description="The correlation ID for this job. Used for tracking the job across services."
|
|
39
|
-
)
|
|
40
|
-
parent_job_execution_id: typing.Optional[str] = pydantic.Field(description="The ID of the parent job execution.")
|
|
41
|
-
user_id: typing.Optional[str] = pydantic.Field(description="The ID of the user that created this job")
|
|
31
|
+
parameters: typing.Optional[EvalDatasetJobParams]
|
|
32
|
+
session_id: typing.Optional[str]
|
|
33
|
+
correlation_id: typing.Optional[str]
|
|
34
|
+
parent_job_execution_id: typing.Optional[str]
|
|
35
|
+
user_id: typing.Optional[str]
|
|
42
36
|
created_at: typing.Optional[dt.datetime] = pydantic.Field(description="Creation datetime")
|
|
43
37
|
id: typing.Optional[str] = pydantic.Field(description="Unique identifier")
|
|
44
38
|
status: StatusEnum
|
|
45
39
|
error_code: typing.Optional[str]
|
|
46
40
|
error_message: typing.Optional[str]
|
|
47
|
-
attempts: typing.Optional[int]
|
|
41
|
+
attempts: typing.Optional[int]
|
|
48
42
|
started_at: typing.Optional[dt.datetime]
|
|
49
43
|
ended_at: typing.Optional[dt.datetime]
|
|
50
44
|
updated_at: typing.Optional[dt.datetime] = pydantic.Field(description="Update datetime")
|
|
51
|
-
data: typing.Optional[Base]
|
|
45
|
+
data: typing.Optional[Base]
|
|
52
46
|
|
|
53
47
|
def json(self, **kwargs: typing.Any) -> str:
|
|
54
48
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
@@ -20,12 +20,8 @@ class EvalExecutionParamsOverride(pydantic.BaseModel):
|
|
|
20
20
|
Schema for the params override for an eval execution.
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
-
llm_model: typing.Optional[SupportedLlmModelNames]
|
|
24
|
-
|
|
25
|
-
)
|
|
26
|
-
qa_prompt_tmpl: typing.Optional[str] = pydantic.Field(
|
|
27
|
-
description="The template to use for the question answering prompt."
|
|
28
|
-
)
|
|
23
|
+
llm_model: typing.Optional[SupportedLlmModelNames]
|
|
24
|
+
qa_prompt_tmpl: typing.Optional[str]
|
|
29
25
|
|
|
30
26
|
def json(self, **kwargs: typing.Any) -> str:
|
|
31
27
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import enum
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
T_Result = typing.TypeVar("T_Result")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class EvalMetric(str, enum.Enum):
|
|
10
|
+
RELEVANCY = "RELEVANCY"
|
|
11
|
+
FAITHFULNESS = "FAITHFULNESS"
|
|
12
|
+
|
|
13
|
+
def visit(self, relevancy: typing.Callable[[], T_Result], faithfulness: typing.Callable[[], T_Result]) -> T_Result:
|
|
14
|
+
if self is EvalMetric.RELEVANCY:
|
|
15
|
+
return relevancy()
|
|
16
|
+
if self is EvalMetric.FAITHFULNESS:
|
|
17
|
+
return faithfulness()
|
|
@@ -15,13 +15,9 @@ except ImportError:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class EvalQuestion(pydantic.BaseModel):
|
|
18
|
-
"""
|
|
19
|
-
Base schema model containing common database fields.
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
18
|
id: str = pydantic.Field(description="Unique identifier")
|
|
23
|
-
created_at: typing.Optional[dt.datetime]
|
|
24
|
-
updated_at: typing.Optional[dt.datetime]
|
|
19
|
+
created_at: typing.Optional[dt.datetime]
|
|
20
|
+
updated_at: typing.Optional[dt.datetime]
|
|
25
21
|
content: str = pydantic.Field(description="The content of the question.")
|
|
26
22
|
eval_dataset_id: str
|
|
27
23
|
eval_dataset_index: int = pydantic.Field(
|
|
@@ -22,10 +22,12 @@ class ExtractionResult(pydantic.BaseModel):
|
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
24
|
id: str = pydantic.Field(description="Unique identifier")
|
|
25
|
-
created_at: typing.Optional[dt.datetime]
|
|
26
|
-
updated_at: typing.Optional[dt.datetime]
|
|
25
|
+
created_at: typing.Optional[dt.datetime]
|
|
26
|
+
updated_at: typing.Optional[dt.datetime]
|
|
27
27
|
schema_id: str = pydantic.Field(description="The id of the schema")
|
|
28
|
-
data: typing.Dict[str, ExtractionResultDataValue] = pydantic.Field(
|
|
28
|
+
data: typing.Dict[str, typing.Optional[ExtractionResultDataValue]] = pydantic.Field(
|
|
29
|
+
description="The data extracted from the file"
|
|
30
|
+
)
|
|
29
31
|
file: File = pydantic.Field(description="The file that the extract was extracted from")
|
|
30
32
|
|
|
31
33
|
def json(self, **kwargs: typing.Any) -> str:
|
|
@@ -21,13 +21,11 @@ class ExtractionSchema(pydantic.BaseModel):
|
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
23
|
id: str = pydantic.Field(description="Unique identifier")
|
|
24
|
-
created_at: typing.Optional[dt.datetime]
|
|
25
|
-
updated_at: typing.Optional[dt.datetime]
|
|
24
|
+
created_at: typing.Optional[dt.datetime]
|
|
25
|
+
updated_at: typing.Optional[dt.datetime]
|
|
26
26
|
name: str = pydantic.Field(description="The name of the extraction schema")
|
|
27
27
|
project_id: str = pydantic.Field(description="The ID of the project that the extraction schema belongs to")
|
|
28
|
-
data_schema: typing.Optional[typing.Dict[str, ExtractionSchemaDataSchemaValue]]
|
|
29
|
-
description="The schema of the data"
|
|
30
|
-
)
|
|
28
|
+
data_schema: typing.Optional[typing.Dict[str, typing.Optional[ExtractionSchemaDataSchemaValue]]]
|
|
31
29
|
|
|
32
30
|
def json(self, **kwargs: typing.Any) -> str:
|
|
33
31
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
llama_cloud/types/file.py
CHANGED
|
@@ -21,19 +21,15 @@ class File(pydantic.BaseModel):
|
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
23
|
id: str = pydantic.Field(description="Unique identifier")
|
|
24
|
-
created_at: typing.Optional[dt.datetime]
|
|
25
|
-
updated_at: typing.Optional[dt.datetime]
|
|
24
|
+
created_at: typing.Optional[dt.datetime]
|
|
25
|
+
updated_at: typing.Optional[dt.datetime]
|
|
26
26
|
name: str
|
|
27
|
-
file_size: typing.Optional[int]
|
|
28
|
-
file_type: typing.Optional[str]
|
|
27
|
+
file_size: typing.Optional[int]
|
|
28
|
+
file_type: typing.Optional[str]
|
|
29
29
|
project_id: str = pydantic.Field(description="The ID of the project that the file belongs to")
|
|
30
|
-
last_modified_at: typing.Optional[dt.datetime]
|
|
31
|
-
resource_info: typing.Optional[typing.Dict[str, FileResourceInfoValue]]
|
|
32
|
-
|
|
33
|
-
)
|
|
34
|
-
data_source_id: typing.Optional[str] = pydantic.Field(
|
|
35
|
-
description="The ID of the data source that the file belongs to"
|
|
36
|
-
)
|
|
30
|
+
last_modified_at: typing.Optional[dt.datetime]
|
|
31
|
+
resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileResourceInfoValue]]]
|
|
32
|
+
data_source_id: typing.Optional[str]
|
|
37
33
|
|
|
38
34
|
def json(self, **kwargs: typing.Any) -> str:
|
|
39
35
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
@@ -15,29 +15,14 @@ except ImportError:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class GeminiEmbedding(pydantic.BaseModel):
|
|
18
|
-
""
|
|
19
|
-
Google Gemini embeddings.
|
|
20
|
-
|
|
21
|
-
Args:
|
|
22
|
-
model_name (str): Model for embedding.
|
|
23
|
-
Defaults to "models/embedding-001".
|
|
24
|
-
|
|
25
|
-
api_key (Optional[str]): API key to access the model. Defaults to None.
|
|
26
|
-
api_base (Optional[str]): API base to access the model. Defaults to Official Base.
|
|
27
|
-
transport (Optional[str]): Transport to access the model.
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
model_name: typing.Optional[str] = pydantic.Field(description="The name of the embedding model.")
|
|
18
|
+
model_name: typing.Optional[str] = pydantic.Field(description="The modelId of the Gemini model to use.")
|
|
31
19
|
embed_batch_size: typing.Optional[int] = pydantic.Field(description="The batch size for embedding calls.")
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
)
|
|
39
|
-
task_type: typing.Optional[str] = pydantic.Field(description="The task for embedding model.")
|
|
40
|
-
api_key: typing.Optional[str] = pydantic.Field(description="API key to access the model. Defaults to None.")
|
|
20
|
+
num_workers: typing.Optional[int]
|
|
21
|
+
title: typing.Optional[str]
|
|
22
|
+
task_type: typing.Optional[str]
|
|
23
|
+
api_key: typing.Optional[str]
|
|
24
|
+
api_base: typing.Optional[str]
|
|
25
|
+
transport: typing.Optional[str]
|
|
41
26
|
class_name: typing.Optional[str]
|
|
42
27
|
|
|
43
28
|
def json(self, **kwargs: typing.Any) -> str:
|