dataiku-api-client 14.4.2__tar.gz → 14.4.3__tar.gz
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.
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/HISTORY.txt +6 -0
- {dataiku_api_client-14.4.2/dataiku_api_client.egg-info → dataiku_api_client-14.4.3}/PKG-INFO +8 -2
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3/dataiku_api_client.egg-info}/PKG-INFO +8 -2
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/document_extractor.py +159 -29
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/project.py +8 -7
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/recipe.py +94 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/setup.py +1 -1
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/LICENSE.txt +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/MANIFEST.in +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/README +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataiku_api_client.egg-info/SOURCES.txt +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataiku_api_client.egg-info/dependency_links.txt +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataiku_api_client.egg-info/requires.txt +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataiku_api_client.egg-info/top_level.txt +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/apinode_admin/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/apinode_admin/auth.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/apinode_admin/service.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/apinode_admin_client.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/apinode_client.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/auth.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/base_client.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/admin.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/agent.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/agent_review.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/agent_tool.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/analysis.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/apideployer.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/apiservice.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/app.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/businessapp.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/codestudio.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/continuousactivity.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/dashboard.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/data_collection.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/data_directories_footprint.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/data_quality.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/dataset.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/discussion.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/drift.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/enterprise_asset_library.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/evaluationcomparison.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/evaluationstore.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/feature_store.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/flow.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/future.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/insight.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/job.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/jupyternotebook.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/knowledgebank.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/labeling_task.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/langchain/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/langchain/embeddings.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/langchain/knowledge_bank.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/langchain/llm.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/langchain/tool.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/langchain/utils.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/llm.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/llm_tracing/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/macro.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/managedfolder.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/meaning.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/messaging_channel.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/metrics.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/ml.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/mlflow.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/modelcomparison.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/modelevaluationstore.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/notebook.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/plugin.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/project_standards.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/projectdeployer.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/projectfolder.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/projectlibrary.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/retrieval_augmented_llm.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/savedmodel.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/scenario.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/semantic_model.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/sqlnotebook.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/sqlquery.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/statistics.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/streaming_endpoint.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/tools/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/tools/codegen.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/tools/langchain.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/unifiedmonitoring.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/utils.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/webapp.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/wiki.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/workspace.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss_plugin_mlflow/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss_plugin_mlflow/artifact_repository.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss_plugin_mlflow/header_provider.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss_plugin_mlflow/utils.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dssclient.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/fm/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/fm/cloudaccounts.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/fm/future.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/fm/instances.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/fm/instancesettingstemplates.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/fm/loadbalancers.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/fm/tenant.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/fm/virtualnetworks.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/fmclient.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/admin.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/admin_blueprint_designer.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/admin_custom_pages_handler.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/admin_roles_permissions_handler.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/artifact.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/artifact_search.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/blueprint.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/custom_page.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/future.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/time_series.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/uploaded_file.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/users_container.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern_client.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/iam/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/iam/settings.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/launchpad/__init__.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/launchpad/exceptions.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/launchpad/group.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/launchpad/node.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/launchpad/profile.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/launchpad/response.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/launchpad/task.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/launchpad/user.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/launchpad_client.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/utils.py +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/requirements.txt +0 -0
- {dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/setup.cfg +0 -0
{dataiku_api_client-14.4.2/dataiku_api_client.egg-info → dataiku_api_client-14.4.3}/PKG-INFO
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dataiku-api-client
|
|
3
|
-
Version: 14.4.
|
|
3
|
+
Version: 14.4.3
|
|
4
4
|
Summary: Python API client for Dataiku APIs
|
|
5
5
|
Home-page: https://www.dataiku.com
|
|
6
|
-
Download-URL: https://github.com/dataiku/dataiku-api-client-python/tarball/14.4.
|
|
6
|
+
Download-URL: https://github.com/dataiku/dataiku-api-client-python/tarball/14.4.3
|
|
7
7
|
Author: Dataiku
|
|
8
8
|
Author-email: support@dataiku.com
|
|
9
9
|
License: Apache Software License
|
|
@@ -36,6 +36,12 @@ Changelog
|
|
|
36
36
|
==========
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
14.4.3 (2026-03-19)
|
|
40
|
+
-------------------
|
|
41
|
+
|
|
42
|
+
* Initial release for DSS 14.4.3
|
|
43
|
+
|
|
44
|
+
|
|
39
45
|
14.4.2 (2026-03-06)
|
|
40
46
|
-------------------
|
|
41
47
|
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3/dataiku_api_client.egg-info}/PKG-INFO
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dataiku-api-client
|
|
3
|
-
Version: 14.4.
|
|
3
|
+
Version: 14.4.3
|
|
4
4
|
Summary: Python API client for Dataiku APIs
|
|
5
5
|
Home-page: https://www.dataiku.com
|
|
6
|
-
Download-URL: https://github.com/dataiku/dataiku-api-client-python/tarball/14.4.
|
|
6
|
+
Download-URL: https://github.com/dataiku/dataiku-api-client-python/tarball/14.4.3
|
|
7
7
|
Author: Dataiku
|
|
8
8
|
Author-email: support@dataiku.com
|
|
9
9
|
License: Apache Software License
|
|
@@ -36,6 +36,12 @@ Changelog
|
|
|
36
36
|
==========
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
14.4.3 (2026-03-19)
|
|
40
|
+
-------------------
|
|
41
|
+
|
|
42
|
+
* Initial release for DSS 14.4.3
|
|
43
|
+
|
|
44
|
+
|
|
39
45
|
14.4.2 (2026-03-06)
|
|
40
46
|
-------------------
|
|
41
47
|
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/document_extractor.py
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import base64
|
|
2
|
-
|
|
3
2
|
import copy
|
|
4
3
|
import json
|
|
4
|
+
import warnings
|
|
5
5
|
|
|
6
6
|
from dataikuapi.utils import _write_response_content_to_file
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
class DocumentExtractor(object):
|
|
9
10
|
"""
|
|
10
11
|
A handle to interact with a DSS-managed Document Extractor.
|
|
@@ -51,14 +52,14 @@ class DocumentExtractor(object):
|
|
|
51
52
|
extractor_request["inputs"] = {
|
|
52
53
|
"imagesRef": {
|
|
53
54
|
"type": images[0].type,
|
|
54
|
-
"inlineImages": [ir.
|
|
55
|
+
"inlineImages": [ir.as_dict() for ir in images]
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
elif all(isinstance(ir, ManagedFolderImageRef) for ir in images):
|
|
58
59
|
extractor_request["inputs"] = {
|
|
59
60
|
"imagesRef": {
|
|
60
61
|
"type": images[0].type,
|
|
61
|
-
"
|
|
62
|
+
"managedFolderRef": images[0].managed_folder_ref,
|
|
62
63
|
"imagesPaths": [ir.image_path for ir in images]
|
|
63
64
|
}
|
|
64
65
|
}
|
|
@@ -102,12 +103,12 @@ class DocumentExtractor(object):
|
|
|
102
103
|
|
|
103
104
|
extractor_request = {
|
|
104
105
|
"inputs": {
|
|
105
|
-
"document": document.
|
|
106
|
+
"document": document.as_dict()
|
|
106
107
|
},
|
|
107
108
|
"settings": {
|
|
108
109
|
"maxSectionDepth": max_section_depth,
|
|
109
110
|
"imageValidation": image_validation,
|
|
110
|
-
"
|
|
111
|
+
"outputManagedFolderRef": output_managed_folder,
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
if image_handling_mode == "IGNORE":
|
|
@@ -164,7 +165,7 @@ class DocumentExtractor(object):
|
|
|
164
165
|
|
|
165
166
|
extractor_request = {
|
|
166
167
|
"inputs": {
|
|
167
|
-
"document": document.
|
|
168
|
+
"document": document.as_dict()
|
|
168
169
|
},
|
|
169
170
|
"settings": {
|
|
170
171
|
}
|
|
@@ -212,7 +213,7 @@ class DocumentExtractor(object):
|
|
|
212
213
|
for idx, screenshot in enumerate(response):
|
|
213
214
|
if (idx % fetch_size == 0) and idx != 0:
|
|
214
215
|
print(f"Computing the next {fetch_size} screenshots")
|
|
215
|
-
print(f"Screenshot #{idx}: {screenshot.
|
|
216
|
+
print(f"Screenshot #{idx}: {screenshot.as_dict()}")
|
|
216
217
|
|
|
217
218
|
# Alternatively, response being an iterable, you can compute & fetch all screenshots at once:
|
|
218
219
|
response = doc_extractor.generate_pages_screenshots(document_ref)
|
|
@@ -275,12 +276,30 @@ class ScreenshotterRequest(object):
|
|
|
275
276
|
self.fetch_size = fetch_size
|
|
276
277
|
|
|
277
278
|
def as_json(self):
|
|
279
|
+
"""
|
|
280
|
+
Get a dictionary representation.
|
|
281
|
+
|
|
282
|
+
.. caution::
|
|
283
|
+
|
|
284
|
+
Deprecated, use :meth:`as_dict` instead
|
|
285
|
+
|
|
286
|
+
:rtype: dict
|
|
287
|
+
"""
|
|
288
|
+
warnings.warn("ScreenshotterRequest.as_json is deprecated, please use as_dict", DeprecationWarning)
|
|
289
|
+
return self.as_dict()
|
|
290
|
+
|
|
291
|
+
def as_dict(self):
|
|
292
|
+
"""
|
|
293
|
+
Get a dictionary representation.
|
|
294
|
+
|
|
295
|
+
:rtype: dict
|
|
296
|
+
"""
|
|
278
297
|
return {
|
|
279
298
|
"inputs": {
|
|
280
|
-
"document": self.document.
|
|
299
|
+
"document": self.document.as_dict(),
|
|
281
300
|
},
|
|
282
301
|
"settings": {
|
|
283
|
-
"
|
|
302
|
+
"outputManagedFolderRef": self.output_managed_folder,
|
|
284
303
|
"paginationOffset": self.offset,
|
|
285
304
|
"paginationSize": self.fetch_size,
|
|
286
305
|
}
|
|
@@ -300,7 +319,7 @@ class ScreenshotterResponse(object):
|
|
|
300
319
|
self.project_key = project_key
|
|
301
320
|
self.screenshotter_request = screenshotter_request
|
|
302
321
|
self._current_data = self.client._perform_json("POST", "/projects/%s/document-extractors/screenshotter" % self.project_key,
|
|
303
|
-
raw_body={"screenshotRequest": json.dumps(screenshotter_request.
|
|
322
|
+
raw_body={"screenshotRequest": json.dumps(screenshotter_request.as_dict())},
|
|
304
323
|
files={"file": screenshotter_request.document.file} if isinstance(screenshotter_request.document,
|
|
305
324
|
LocalFileDocumentRef) else None)
|
|
306
325
|
self._fail_unless_success()
|
|
@@ -324,7 +343,7 @@ class ScreenshotterResponse(object):
|
|
|
324
343
|
self.screenshotter_request.offset = screenshot_index
|
|
325
344
|
self.screenshotter_request.document = self.document
|
|
326
345
|
self._current_data = self.client._perform_json("POST", "/projects/%s/document-extractors/screenshotter" % self.project_key,
|
|
327
|
-
raw_body={"screenshotRequest": json.dumps(self.screenshotter_request.
|
|
346
|
+
raw_body={"screenshotRequest": json.dumps(self.screenshotter_request.as_dict())},
|
|
328
347
|
files={"file": self.document.file} if isinstance(self.document, LocalFileDocumentRef) else None)
|
|
329
348
|
self._fail_unless_success()
|
|
330
349
|
self._update_screenshot_list_at_index(screenshot_index)
|
|
@@ -335,7 +354,7 @@ class ScreenshotterResponse(object):
|
|
|
335
354
|
res = [InlineImageRef(image["content"], image["mimeType"] if "mimeType" in image else None) for image in
|
|
336
355
|
self._current_data["imagesRefs"]["inlineImages"]]
|
|
337
356
|
elif self._current_data["imagesRefs"]["type"] == "managed_folder":
|
|
338
|
-
res = [ManagedFolderImageRef(self._current_data["imagesRefs"]["
|
|
357
|
+
res = [ManagedFolderImageRef(self._current_data["imagesRefs"]["managedFolderRef"], path) for path in self._current_data["imagesRefs"]["imagesPaths"]]
|
|
339
358
|
else:
|
|
340
359
|
raise ValueError("Did not return valid images ref")
|
|
341
360
|
if not self.keep_fetched:
|
|
@@ -376,7 +395,9 @@ class ScreenshotterResponse(object):
|
|
|
376
395
|
"""
|
|
377
396
|
doc_type = self._current_data.get("documentRef").get("type")
|
|
378
397
|
if doc_type == "managed_folder":
|
|
379
|
-
|
|
398
|
+
document_ref = self._current_data.get("documentRef")
|
|
399
|
+
managed_folder_ref = document_ref.get("managedFolderRef") or document_ref.get("managedFolderId")
|
|
400
|
+
return ManagedFolderDocumentRef(document_ref.get("filePath"), managed_folder_ref)
|
|
380
401
|
if doc_type == "tmp_file":
|
|
381
402
|
return _TmpDocumentRef(self._current_data.get("documentRef").get("tmpFileName"), self._current_data.get("documentRef").get("originalFileName"))
|
|
382
403
|
else:
|
|
@@ -513,19 +534,19 @@ class StructuredExtractorResponse(object):
|
|
|
513
534
|
"""
|
|
514
535
|
|
|
515
536
|
def _flatten_using_dfs(node, current_outline):
|
|
516
|
-
if not node or
|
|
537
|
+
if not node or "type" not in node:
|
|
517
538
|
return []
|
|
518
539
|
elif node["type"] == "text" or node["type"] == "table":
|
|
519
|
-
if
|
|
540
|
+
if "text" not in node or not node["text"]:
|
|
520
541
|
return []
|
|
521
542
|
return [{"text": node["text"], "outline": current_outline}]
|
|
522
543
|
elif node["type"] == "image":
|
|
523
|
-
if
|
|
544
|
+
if "description" not in node or not node["description"]:
|
|
524
545
|
return []
|
|
525
546
|
return [{"text": node["description"], "outline": current_outline}]
|
|
526
547
|
elif node["type"] not in ["document", "section", "slide"]:
|
|
527
548
|
raise ValueError("Unsupported structured content type: " + node["type"])
|
|
528
|
-
if
|
|
549
|
+
if "content" not in node:
|
|
529
550
|
return []
|
|
530
551
|
deeper_outline = copy.deepcopy(current_outline)
|
|
531
552
|
if node["type"] == "section":
|
|
@@ -559,7 +580,7 @@ class PDFConversionResponse(object):
|
|
|
559
580
|
self.path_in_output_folder = path_in_output_folder
|
|
560
581
|
pdf_convert_request = {
|
|
561
582
|
"inputs": {
|
|
562
|
-
"document": document.
|
|
583
|
+
"document": document.as_dict()
|
|
563
584
|
}
|
|
564
585
|
}
|
|
565
586
|
if output_managed_folder is not None:
|
|
@@ -619,7 +640,9 @@ class PDFConversionResponse(object):
|
|
|
619
640
|
if self.output_managed_folder is None:
|
|
620
641
|
return None
|
|
621
642
|
else:
|
|
622
|
-
|
|
643
|
+
document_ref = self._data.get("documentRef")
|
|
644
|
+
managed_folder_ref = document_ref.get("managedFolderRef") or document_ref.get("managedFolderId")
|
|
645
|
+
return ManagedFolderDocumentRef(document_ref.get("filePath"), managed_folder_ref)
|
|
623
646
|
|
|
624
647
|
@property
|
|
625
648
|
def success(self):
|
|
@@ -685,7 +708,7 @@ class VlmExtractorResponse(object):
|
|
|
685
708
|
|
|
686
709
|
|
|
687
710
|
class InputRef(object):
|
|
688
|
-
def
|
|
711
|
+
def as_dict(self):
|
|
689
712
|
raise NotImplementedError
|
|
690
713
|
|
|
691
714
|
|
|
@@ -703,7 +726,7 @@ class DocumentRef(InputRef):
|
|
|
703
726
|
self.type = None
|
|
704
727
|
self.mime_type = mime_type
|
|
705
728
|
|
|
706
|
-
def
|
|
729
|
+
def as_dict(self):
|
|
707
730
|
raise NotImplementedError
|
|
708
731
|
|
|
709
732
|
|
|
@@ -732,6 +755,19 @@ class LocalFileDocumentRef(DocumentRef):
|
|
|
732
755
|
self.file = fp
|
|
733
756
|
|
|
734
757
|
def as_json(self):
|
|
758
|
+
"""
|
|
759
|
+
Get a dictionary representation.
|
|
760
|
+
|
|
761
|
+
.. caution::
|
|
762
|
+
|
|
763
|
+
Deprecated, use :meth:`as_dict` instead
|
|
764
|
+
|
|
765
|
+
:rtype: dict
|
|
766
|
+
"""
|
|
767
|
+
warnings.warn("LocalFileDocumentRef.as_json is deprecated, please use as_dict", DeprecationWarning)
|
|
768
|
+
return self.as_dict()
|
|
769
|
+
|
|
770
|
+
def as_dict(self):
|
|
735
771
|
return {
|
|
736
772
|
"type": self.type,
|
|
737
773
|
"mimeType": self.mime_type,
|
|
@@ -758,6 +794,19 @@ class _TmpDocumentRef(DocumentRef):
|
|
|
758
794
|
self.original_file_name = original_file_name
|
|
759
795
|
|
|
760
796
|
def as_json(self):
|
|
797
|
+
"""
|
|
798
|
+
Get a dictionary representation.
|
|
799
|
+
|
|
800
|
+
.. caution::
|
|
801
|
+
|
|
802
|
+
Deprecated, use :meth:`as_dict` instead
|
|
803
|
+
|
|
804
|
+
:rtype: dict
|
|
805
|
+
"""
|
|
806
|
+
warnings.warn("_TmpDocumentRef.as_json is deprecated, please use as_dict", DeprecationWarning)
|
|
807
|
+
return self.as_dict()
|
|
808
|
+
|
|
809
|
+
def as_dict(self):
|
|
761
810
|
return {
|
|
762
811
|
"type": self.type,
|
|
763
812
|
"tmpFileName": self.tmp_file_name,
|
|
@@ -789,13 +838,36 @@ class ManagedFolderDocumentRef(DocumentRef):
|
|
|
789
838
|
super(ManagedFolderDocumentRef, self).__init__(mime_type)
|
|
790
839
|
self.type = "managed_folder"
|
|
791
840
|
self.file_path = file_path
|
|
792
|
-
self.
|
|
841
|
+
self.managed_folder_ref = managed_folder_id
|
|
842
|
+
|
|
843
|
+
@property
|
|
844
|
+
def managed_folder_id(self):
|
|
845
|
+
warnings.warn("ManagedFolderDocumentRef.managed_folder_id is deprecated, please use managed_folder_ref", DeprecationWarning)
|
|
846
|
+
return self.managed_folder_ref
|
|
793
847
|
|
|
794
848
|
def as_json(self):
|
|
849
|
+
"""
|
|
850
|
+
Get a dictionary representation.
|
|
851
|
+
|
|
852
|
+
.. caution::
|
|
853
|
+
|
|
854
|
+
Deprecated, use :meth:`as_dict` instead
|
|
855
|
+
|
|
856
|
+
:rtype: dict
|
|
857
|
+
"""
|
|
858
|
+
warnings.warn("ManagedFolderDocumentRef.as_json is deprecated, please use as_dict", DeprecationWarning)
|
|
859
|
+
return self.as_dict()
|
|
860
|
+
|
|
861
|
+
def as_dict(self):
|
|
862
|
+
"""
|
|
863
|
+
Get a dictionary representation.
|
|
864
|
+
|
|
865
|
+
:rtype: dict
|
|
866
|
+
"""
|
|
795
867
|
return {
|
|
796
868
|
"type": self.type,
|
|
797
869
|
"filePath": self.file_path,
|
|
798
|
-
"
|
|
870
|
+
"managedFolderRef": self.managed_folder_ref,
|
|
799
871
|
"mimeType": self.mime_type,
|
|
800
872
|
}
|
|
801
873
|
|
|
@@ -818,6 +890,23 @@ class InlineDocumentRef(DocumentRef):
|
|
|
818
890
|
self.content_type = content_type
|
|
819
891
|
|
|
820
892
|
def as_json(self):
|
|
893
|
+
"""
|
|
894
|
+
Get a dictionary representation.
|
|
895
|
+
|
|
896
|
+
.. caution::
|
|
897
|
+
|
|
898
|
+
Deprecated, use :meth:`as_dict` instead
|
|
899
|
+
|
|
900
|
+
:rtype: dict
|
|
901
|
+
"""
|
|
902
|
+
return self.as_dict()
|
|
903
|
+
|
|
904
|
+
def as_dict(self):
|
|
905
|
+
"""
|
|
906
|
+
Get a dictionary representation.
|
|
907
|
+
|
|
908
|
+
:rtype: dict
|
|
909
|
+
"""
|
|
821
910
|
return {
|
|
822
911
|
"type": self.type,
|
|
823
912
|
"content": self.content,
|
|
@@ -854,7 +943,7 @@ class ImageRef(InputRef):
|
|
|
854
943
|
super(ImageRef, self).__init__()
|
|
855
944
|
self.type = None
|
|
856
945
|
|
|
857
|
-
def
|
|
946
|
+
def as_dict(self):
|
|
858
947
|
raise NotImplementedError
|
|
859
948
|
|
|
860
949
|
|
|
@@ -891,6 +980,24 @@ class InlineImageRef(ImageRef):
|
|
|
891
980
|
self.mime_type = mime_type
|
|
892
981
|
|
|
893
982
|
def as_json(self):
|
|
983
|
+
"""
|
|
984
|
+
Get a dictionary representation.
|
|
985
|
+
|
|
986
|
+
.. caution::
|
|
987
|
+
|
|
988
|
+
Deprecated, use :meth:`as_dict` instead
|
|
989
|
+
|
|
990
|
+
:rtype: dict
|
|
991
|
+
"""
|
|
992
|
+
warnings.warn("InlineImageRef.as_json is deprecated, please use as_dict", DeprecationWarning)
|
|
993
|
+
return self.as_dict()
|
|
994
|
+
|
|
995
|
+
def as_dict(self):
|
|
996
|
+
"""
|
|
997
|
+
Get a dictionary representation.
|
|
998
|
+
|
|
999
|
+
:rtype: dict
|
|
1000
|
+
"""
|
|
894
1001
|
res = {
|
|
895
1002
|
"type": self.type,
|
|
896
1003
|
"content": self.image
|
|
@@ -908,25 +1015,48 @@ class ManagedFolderImageRef(ImageRef):
|
|
|
908
1015
|
|
|
909
1016
|
.. code-block:: python
|
|
910
1017
|
|
|
911
|
-
managed_img = ManagedFolderImageRef('
|
|
1018
|
+
managed_img = ManagedFolderImageRef('managed_folder_ref', 'path_in_folder/image.png')
|
|
912
1019
|
|
|
913
1020
|
# Extract a text summary from the image using a vision LLM:
|
|
914
1021
|
resp = doc_ex.vlm_extract([managed_img], 'llm_id')
|
|
915
1022
|
"""
|
|
916
1023
|
|
|
917
|
-
def __init__(self,
|
|
1024
|
+
def __init__(self, managed_folder_ref, image_path):
|
|
918
1025
|
"""
|
|
919
|
-
:param str
|
|
1026
|
+
:param str managed_folder_ref: identifier of the folder containing the image
|
|
920
1027
|
:param str image_path: path to the image file inside the managed folder
|
|
921
1028
|
"""
|
|
922
1029
|
super(ManagedFolderImageRef, self).__init__()
|
|
923
1030
|
self.type = "managed_folder"
|
|
924
|
-
self.
|
|
1031
|
+
self.managed_folder_ref = managed_folder_ref
|
|
925
1032
|
self.image_path = image_path
|
|
926
1033
|
|
|
1034
|
+
@property
|
|
1035
|
+
def managed_folder_id(self):
|
|
1036
|
+
warnings.warn("ManagedFolderImageRef.managed_folder_id is deprecated, please use managed_folder_ref", DeprecationWarning)
|
|
1037
|
+
return self.managed_folder_ref
|
|
1038
|
+
|
|
927
1039
|
def as_json(self):
|
|
1040
|
+
"""
|
|
1041
|
+
Get a dictionary representation.
|
|
1042
|
+
|
|
1043
|
+
.. caution::
|
|
1044
|
+
|
|
1045
|
+
Deprecated, use :meth:`as_dict` instead
|
|
1046
|
+
|
|
1047
|
+
:rtype: dict
|
|
1048
|
+
"""
|
|
1049
|
+
warnings.warn("ManagedFolderImageRef.as_json is deprecated, please use as_dict", DeprecationWarning)
|
|
1050
|
+
return self.as_dict()
|
|
1051
|
+
|
|
1052
|
+
def as_dict(self):
|
|
1053
|
+
"""
|
|
1054
|
+
Get a dictionary representation.
|
|
1055
|
+
|
|
1056
|
+
:rtype: dict
|
|
1057
|
+
"""
|
|
928
1058
|
return {
|
|
929
1059
|
"type": self.type,
|
|
930
|
-
"
|
|
1060
|
+
"managedFolderRef": self.managed_folder_ref,
|
|
931
1061
|
"imagePath": self.image_path
|
|
932
1062
|
}
|
|
@@ -1829,13 +1829,13 @@ class DSSProject(object):
|
|
|
1829
1829
|
if template_ref is not None:
|
|
1830
1830
|
if not isinstance(template_ref, DocumentRef):
|
|
1831
1831
|
raise ValueError("Unsupported template document ref type %s, document templating only supports DocumentRef objects", template_ref.type)
|
|
1832
|
-
payload["templateRef"] = template_ref.
|
|
1832
|
+
payload["templateRef"] = template_ref.as_dict()
|
|
1833
1833
|
|
|
1834
1834
|
if output_ref is None:
|
|
1835
1835
|
output_ref = InlineDocumentRef("", InlineDocumentRef.CONTENT_TYPE_PLAIN_TEXT)
|
|
1836
1836
|
if not isinstance(output_ref, DocumentRef):
|
|
1837
1837
|
raise ValueError("Unsupported output document ref type %s, document templating only supports DocumentRef objects", template_ref.type)
|
|
1838
|
-
payload["destinationRef"] = output_ref.
|
|
1838
|
+
payload["destinationRef"] = output_ref.as_dict()
|
|
1839
1839
|
|
|
1840
1840
|
ret = self.client._perform_json(
|
|
1841
1841
|
"POST",
|
|
@@ -2315,7 +2315,8 @@ class DSSProject(object):
|
|
|
2315
2315
|
return recipe.EmbedDocumentsRecipeCreator(name, self)
|
|
2316
2316
|
elif type == "extract_content":
|
|
2317
2317
|
return recipe.ExtractContentRecipeCreator(name, self)
|
|
2318
|
-
|
|
2318
|
+
elif type == "prompt":
|
|
2319
|
+
return recipe.PromptRecipeCreator(name, self)
|
|
2319
2320
|
|
|
2320
2321
|
########################################################
|
|
2321
2322
|
# Flow
|
|
@@ -4005,13 +4006,13 @@ class DocumentTemplateRenderingResponse(object):
|
|
|
4005
4006
|
|
|
4006
4007
|
document_ref = self._raw["documentRef"]
|
|
4007
4008
|
if document_ref.get("type") == "managed_folder":
|
|
4008
|
-
if not "
|
|
4009
|
-
raise Exception("No output managed folder
|
|
4009
|
+
if not "managedFolderRef" in document_ref:
|
|
4010
|
+
raise Exception("No output managed folder ref available in the document ref")
|
|
4010
4011
|
if not "filePath" in document_ref:
|
|
4011
4012
|
raise Exception("No output file path available in the document ref")
|
|
4012
4013
|
return ManagedFolderDocumentRef(
|
|
4013
4014
|
document_ref["filePath"],
|
|
4014
|
-
document_ref["
|
|
4015
|
+
document_ref["managedFolderRef"],
|
|
4015
4016
|
mime_type=document_ref.get("mimeType"))
|
|
4016
4017
|
elif document_ref.get("type") == "inline_document":
|
|
4017
4018
|
if not "content" in document_ref:
|
|
@@ -4037,7 +4038,7 @@ class DocumentTemplateRenderingResponse(object):
|
|
|
4037
4038
|
document = self.document
|
|
4038
4039
|
if isinstance(document, ManagedFolderDocumentRef):
|
|
4039
4040
|
project = self.client.get_project(self.project_key)
|
|
4040
|
-
folder = project.get_managed_folder(document.
|
|
4041
|
+
folder = project.get_managed_folder(document.managed_folder_ref)
|
|
4041
4042
|
response = folder.get_file(document.file_path)
|
|
4042
4043
|
response.raise_for_status()
|
|
4043
4044
|
if document.mime_type == "text/plain":
|
|
@@ -259,6 +259,8 @@ class DSSRecipe(object):
|
|
|
259
259
|
return EmbedDocumentsRecipeSettings(self, data)
|
|
260
260
|
elif type == "extract_content":
|
|
261
261
|
return ExtractContentRecipeSettings(self, data)
|
|
262
|
+
elif type == "prompt":
|
|
263
|
+
return PromptRecipeSettings(self, data)
|
|
262
264
|
else:
|
|
263
265
|
return DSSRecipeSettings(self, data)
|
|
264
266
|
|
|
@@ -3636,3 +3638,95 @@ class ClusteringScoringRecipeCreator(SingleOutputRecipeCreator):
|
|
|
3636
3638
|
:param string model_id: identifier of a saved model
|
|
3637
3639
|
"""
|
|
3638
3640
|
return self._with_input(model_id, self.project.project_key, "model")
|
|
3641
|
+
|
|
3642
|
+
|
|
3643
|
+
class PromptRecipeSettings(DSSRecipeSettings):
|
|
3644
|
+
"""
|
|
3645
|
+
Settings of a Prompt recipe.
|
|
3646
|
+
|
|
3647
|
+
.. important::
|
|
3648
|
+
|
|
3649
|
+
Do not instantiate directly, use :meth:`DSSRecipe.get_settings()`
|
|
3650
|
+
|
|
3651
|
+
A Prompt recipe allows you to use Large Language Models (LLMs) to process
|
|
3652
|
+
dataset rows, typically for tasks like text summarization, classification,
|
|
3653
|
+
or information extraction.
|
|
3654
|
+
|
|
3655
|
+
The payload of this recipe is a JSON object containing the prompt
|
|
3656
|
+
template, the selected LLM, and various generation parameters
|
|
3657
|
+
"""
|
|
3658
|
+
pass
|
|
3659
|
+
|
|
3660
|
+
class PromptRecipeCreator(SingleOutputRecipeCreator):
|
|
3661
|
+
"""
|
|
3662
|
+
Helper to create a new Prompt recipe.
|
|
3663
|
+
|
|
3664
|
+
.. important::
|
|
3665
|
+
|
|
3666
|
+
Do not instantiate directly, use :meth:`dataikuapi.dss.project.DSSProject.new_recipe()`
|
|
3667
|
+
with type 'prompt' instead.
|
|
3668
|
+
|
|
3669
|
+
Usage example:
|
|
3670
|
+
|
|
3671
|
+
.. code-block:: python
|
|
3672
|
+
|
|
3673
|
+
project = client.get_project("MYPROJECT")
|
|
3674
|
+
builder = project.new_recipe("prompt", "my_prompt_recipe")
|
|
3675
|
+
|
|
3676
|
+
# Define the input dataset and the LLM to use
|
|
3677
|
+
builder.with_input("input_dataset")
|
|
3678
|
+
|
|
3679
|
+
# Define the llm to use, it can be an agent or simply an llm
|
|
3680
|
+
builder.with_llm("my-gpt-4-connection")
|
|
3681
|
+
# or using an agent, ra-llm or finetuned model like this
|
|
3682
|
+
builder.with_llm("agent:agentid")
|
|
3683
|
+
|
|
3684
|
+
A `DSSLLMListItem` or `DSSLLM` is also supported as input for `with_llm`
|
|
3685
|
+
|
|
3686
|
+
# Create a new output dataset for the results
|
|
3687
|
+
builder.with_new_output("output_dataset", connection="filesystem_managed")
|
|
3688
|
+
|
|
3689
|
+
recipe = builder.create()
|
|
3690
|
+
"""
|
|
3691
|
+
|
|
3692
|
+
def __init__(self, name, project):
|
|
3693
|
+
SingleOutputRecipeCreator.__init__(self, 'prompt', name, project)
|
|
3694
|
+
|
|
3695
|
+
def with_llm(self, llm):
|
|
3696
|
+
"""
|
|
3697
|
+
Sets the LLM to be used by the recipe.
|
|
3698
|
+
|
|
3699
|
+
:param llm: the LLM to use. Can be a :class:`dataikuapi.dss.llm.DSSLLM` handle,
|
|
3700
|
+
a :class:`dataikuapi.dss.llm.DSSLLMListItem`, or the LLM identifier string.
|
|
3701
|
+
:type llm: object or str
|
|
3702
|
+
|
|
3703
|
+
:return: self
|
|
3704
|
+
:rtype: :class:`PromptRecipeCreator`
|
|
3705
|
+
"""
|
|
3706
|
+
if isinstance(llm, DSSLLM):
|
|
3707
|
+
llm_id = llm.llm_id
|
|
3708
|
+
elif isinstance(llm, DSSLLMListItem):
|
|
3709
|
+
llm_id = llm.id
|
|
3710
|
+
elif isinstance(llm, str):
|
|
3711
|
+
llm_id = llm
|
|
3712
|
+
else:
|
|
3713
|
+
raise ValueError("Unknown LLM: %s" % llm)
|
|
3714
|
+
initial_payload = self.creation_settings.setdefault("initialPayload", {})
|
|
3715
|
+
initial_payload["llmId"] = llm_id
|
|
3716
|
+
initial_payload["onlySetLLMId"] = False
|
|
3717
|
+
|
|
3718
|
+
chunks = llm_id.split(":")
|
|
3719
|
+
llm_type = chunks[0]
|
|
3720
|
+
type_to_id_index = {
|
|
3721
|
+
"agent": 1,
|
|
3722
|
+
"retrieval-augmented-llm": 1,
|
|
3723
|
+
"saved-model": 3
|
|
3724
|
+
}
|
|
3725
|
+
# For agents, ra llms and finetuned models we also need to add them as input models
|
|
3726
|
+
if llm_type in type_to_id_index:
|
|
3727
|
+
idx = type_to_id_index[llm_type]
|
|
3728
|
+
if len(chunks) <= idx:
|
|
3729
|
+
raise ValueError("Malformed LLM id: %s" % llm_id)
|
|
3730
|
+
model_id = chunks[idx]
|
|
3731
|
+
return self._with_input(model_id, self.project.project_key, "model")
|
|
3732
|
+
return self
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataiku_api_client.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataiku_api_client.egg-info/requires.txt
RENAMED
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataiku_api_client.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/apinode_admin/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/continuousactivity.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/data_directories_footprint.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/enterprise_asset_library.py
RENAMED
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/evaluationcomparison.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/langchain/__init__.py
RENAMED
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/langchain/embeddings.py
RENAMED
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/langchain/knowledge_bank.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/llm_tracing/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/modelevaluationstore.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/retrieval_augmented_llm.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss/streaming_endpoint.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss_plugin_mlflow/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/dss_plugin_mlflow/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/fm/instancesettingstemplates.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/artifact_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataiku_api_client-14.4.2 → dataiku_api_client-14.4.3}/dataikuapi/govern/users_container.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|