dataiku-api-client 14.7.1__tar.gz → 14.7.2__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.
Files changed (136) hide show
  1. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/HISTORY.txt +5 -0
  2. {dataiku_api_client-14.7.1/dataiku_api_client.egg-info → dataiku_api_client-14.7.2}/PKG-INFO +7 -2
  3. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2/dataiku_api_client.egg-info}/PKG-INFO +7 -2
  4. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/agent.py +45 -0
  5. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/cobuild.py +168 -4
  6. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/knowledgebank.py +12 -3
  7. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/llm_utils/__init__.py +3 -0
  8. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/project.py +17 -0
  9. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/recipe.py +42 -28
  10. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/retrieval_augmented_llm.py +45 -0
  11. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/setup.py +1 -1
  12. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/LICENSE.txt +0 -0
  13. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/MANIFEST.in +0 -0
  14. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/README +0 -0
  15. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataiku_api_client.egg-info/SOURCES.txt +0 -0
  16. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataiku_api_client.egg-info/dependency_links.txt +0 -0
  17. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataiku_api_client.egg-info/requires.txt +0 -0
  18. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataiku_api_client.egg-info/top_level.txt +0 -0
  19. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/__init__.py +0 -0
  20. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/apinode_admin/__init__.py +0 -0
  21. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/apinode_admin/auth.py +0 -0
  22. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/apinode_admin/service.py +0 -0
  23. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/apinode_admin_client.py +0 -0
  24. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/apinode_client.py +0 -0
  25. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/auth.py +0 -0
  26. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/base_client.py +0 -0
  27. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/__init__.py +0 -0
  28. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/admin.py +0 -0
  29. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/agent_review.py +0 -0
  30. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/agent_tool.py +0 -0
  31. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/analysis.py +0 -0
  32. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/apideployer.py +0 -0
  33. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/apiservice.py +0 -0
  34. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/app.py +0 -0
  35. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/businessapp.py +0 -0
  36. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/codestudio.py +0 -0
  37. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/continuousactivity.py +0 -0
  38. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/dashboard.py +0 -0
  39. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/data_collection.py +0 -0
  40. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/data_directories_footprint.py +0 -0
  41. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/data_quality.py +0 -0
  42. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/dataset.py +0 -0
  43. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/discussion.py +0 -0
  44. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/document_extractor.py +0 -0
  45. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/drift.py +0 -0
  46. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/enterprise_asset_library.py +0 -0
  47. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/evaluationcomparison.py +0 -0
  48. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/evaluationstore.py +0 -0
  49. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/feature_store.py +0 -0
  50. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/flow.py +0 -0
  51. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/future.py +0 -0
  52. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/insight.py +0 -0
  53. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/job.py +0 -0
  54. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/jupyternotebook.py +0 -0
  55. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/labeling_task.py +0 -0
  56. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/langchain/__init__.py +0 -0
  57. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/langchain/embeddings.py +0 -0
  58. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/langchain/knowledge_bank.py +0 -0
  59. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/langchain/llm.py +0 -0
  60. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/langchain/tool.py +0 -0
  61. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/langchain/utils.py +0 -0
  62. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/llm.py +0 -0
  63. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/llm_tracing/__init__.py +0 -0
  64. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/local_model.py +0 -0
  65. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/macro.py +0 -0
  66. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/managedfolder.py +0 -0
  67. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/meaning.py +0 -0
  68. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/messaging_channel.py +0 -0
  69. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/metrics.py +0 -0
  70. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/ml.py +0 -0
  71. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/mlflow.py +0 -0
  72. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/modelcomparison.py +0 -0
  73. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/modelevaluationstore.py +0 -0
  74. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/notebook.py +0 -0
  75. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/plugin.py +0 -0
  76. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/project_standards.py +0 -0
  77. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/projectdeployer.py +0 -0
  78. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/projectfolder.py +0 -0
  79. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/projectlibrary.py +0 -0
  80. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/savedmodel.py +0 -0
  81. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/scenario.py +0 -0
  82. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/semantic_model.py +0 -0
  83. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/sqlnotebook.py +0 -0
  84. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/sqlquery.py +0 -0
  85. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/statistics.py +0 -0
  86. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/streaming_endpoint.py +0 -0
  87. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/tools/__init__.py +0 -0
  88. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/tools/codegen.py +0 -0
  89. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/tools/langchain.py +0 -0
  90. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/unifiedmonitoring.py +0 -0
  91. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/utils.py +0 -0
  92. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/webapp.py +0 -0
  93. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/wiki.py +0 -0
  94. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss/workspace.py +0 -0
  95. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss_plugin_mlflow/__init__.py +0 -0
  96. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss_plugin_mlflow/artifact_repository.py +0 -0
  97. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss_plugin_mlflow/header_provider.py +0 -0
  98. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dss_plugin_mlflow/utils.py +0 -0
  99. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/dssclient.py +0 -0
  100. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/fm/__init__.py +0 -0
  101. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/fm/cloudaccounts.py +0 -0
  102. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/fm/future.py +0 -0
  103. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/fm/instances.py +0 -0
  104. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/fm/instancesettingstemplates.py +0 -0
  105. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/fm/loadbalancers.py +0 -0
  106. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/fm/tenant.py +0 -0
  107. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/fm/virtualnetworks.py +0 -0
  108. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/fmclient.py +0 -0
  109. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/__init__.py +0 -0
  110. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/admin.py +0 -0
  111. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/admin_blueprint_designer.py +0 -0
  112. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/admin_custom_pages_handler.py +0 -0
  113. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/admin_roles_permissions_handler.py +0 -0
  114. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/artifact.py +0 -0
  115. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/artifact_search.py +0 -0
  116. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/blueprint.py +0 -0
  117. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/custom_page.py +0 -0
  118. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/future.py +0 -0
  119. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/time_series.py +0 -0
  120. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/uploaded_file.py +0 -0
  121. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern/users_container.py +0 -0
  122. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/govern_client.py +0 -0
  123. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/iam/__init__.py +0 -0
  124. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/iam/settings.py +0 -0
  125. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/launchpad/__init__.py +0 -0
  126. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/launchpad/exceptions.py +0 -0
  127. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/launchpad/group.py +0 -0
  128. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/launchpad/node.py +0 -0
  129. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/launchpad/profile.py +0 -0
  130. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/launchpad/response.py +0 -0
  131. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/launchpad/task.py +0 -0
  132. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/launchpad/user.py +0 -0
  133. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/launchpad_client.py +0 -0
  134. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/dataikuapi/utils.py +0 -0
  135. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/requirements.txt +0 -0
  136. {dataiku_api_client-14.7.1 → dataiku_api_client-14.7.2}/setup.cfg +0 -0
@@ -2,6 +2,11 @@ Changelog
2
2
  ==========
3
3
 
4
4
 
5
+ 14.7.2 (2026-07-13)
6
+ -------------------
7
+
8
+ * Initial release for DSS 14.7.2
9
+
5
10
  14.7.1 (2026-07-13)
6
11
  -------------------
7
12
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataiku-api-client
3
- Version: 14.7.1
3
+ Version: 14.7.2
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.7.1
6
+ Download-URL: https://github.com/dataiku/dataiku-api-client-python/tarball/14.7.2
7
7
  Author: Dataiku
8
8
  Author-email: support@dataiku.com
9
9
  License: Apache Software License
@@ -36,6 +36,11 @@ Changelog
36
36
  ==========
37
37
 
38
38
 
39
+ 14.7.2 (2026-07-13)
40
+ -------------------
41
+
42
+ * Initial release for DSS 14.7.2
43
+
39
44
  14.7.1 (2026-07-13)
40
45
  -------------------
41
46
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataiku-api-client
3
- Version: 14.7.1
3
+ Version: 14.7.2
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.7.1
6
+ Download-URL: https://github.com/dataiku/dataiku-api-client-python/tarball/14.7.2
7
7
  Author: Dataiku
8
8
  Author-email: support@dataiku.com
9
9
  License: Apache Software License
@@ -36,6 +36,11 @@ Changelog
36
36
  ==========
37
37
 
38
38
 
39
+ 14.7.2 (2026-07-13)
40
+ -------------------
41
+
42
+ * Initial release for DSS 14.7.2
43
+
39
44
  14.7.1 (2026-07-13)
40
45
  -------------------
41
46
 
@@ -354,6 +354,51 @@ class DSSAgent(object):
354
354
  "versionId": version_id
355
355
  })
356
356
 
357
+ def get_metrics_series(self, from_timestamp_ms=None, to_timestamp_ms=None, aggregation="MINUTE", timezone=None):
358
+ """
359
+ Get the operational metrics series for this agent.
360
+
361
+ The returned payload may include the ongoing interval for the requested granularity.
362
+ As a consequence, the latest datapoint is temporarily inconsistent and may evolve
363
+ as more raw events are flushed and aggregated at read time.
364
+ The requested time window is aligned to the bucket boundaries of the selected
365
+ aggregation before being read.
366
+
367
+ :param int from_timestamp_ms: Beginning of the requested window, inclusive, as an
368
+ epoch timestamp in milliseconds. The effective lower bound is rounded down
369
+ to the start of its bucket. Optional, defaults to the oldest retained
370
+ timestamp available for the requested aggregation.
371
+ :param int to_timestamp_ms: End of the requested window, exclusive, as an epoch
372
+ timestamp in milliseconds. The effective upper bound is rounded up to the
373
+ next bucket boundary when it falls inside a bucket.
374
+ Optional, defaults to the current time when omitted.
375
+ :param str aggregation: Aggregation granularity. Supported values are ``MINUTE``,
376
+ ``FIVE_MINUTES``, ``HOUR``, ``DAY`` and ``MONTH``.
377
+ :param str timezone: Timezone used to align bucket boundaries. Optional,
378
+ defaults to ``UTC``. Can be a timezone name like ``Europe/Paris``.
379
+ :return: The list of datapoints. Each datapoint contains a ``timestampMs``
380
+ expressed as the start timestamp of its bucket in epoch
381
+ milliseconds. For example, with ``HOUR`` aggregation, a datapoint
382
+ at ``18:00`` represents the interval ``[18:00, 19:00)``.
383
+ :rtype: list[dict]
384
+ """
385
+ if from_timestamp_ms is not None and not isinstance(from_timestamp_ms, int):
386
+ raise TypeError("Expected int for from_timestamp_ms, got %s" % type(from_timestamp_ms).__name__)
387
+ if to_timestamp_ms is not None and not isinstance(to_timestamp_ms, int):
388
+ raise TypeError("Expected int for to_timestamp_ms, got %s" % type(to_timestamp_ms).__name__)
389
+ if timezone is not None and not isinstance(timezone, str):
390
+ raise TypeError("Expected str for timezone, got %s" % type(timezone).__name__)
391
+
392
+ return self.client._perform_json(
393
+ "GET", "/projects/%s/agents/%s/operational-metrics/series" % (self.project_key, self.id),
394
+ params={
395
+ "fromTimestampMs": from_timestamp_ms,
396
+ "toTimestampMs": to_timestamp_ms,
397
+ "aggregation": aggregation,
398
+ "timezone": timezone
399
+ }
400
+ )
401
+
357
402
 
358
403
  class DSSAgentSettings(DSSTaggableObjectSettings):
359
404
  """
@@ -28,7 +28,8 @@ class CobuildAssistantResponse(CobuildMessage):
28
28
 
29
29
  .. important::
30
30
  Do not create this class directly, it is returned by :meth:`DSSCobuildConversation.send_message`
31
- and :meth:`DSSCobuildConversation.answer_confirmation`.
31
+ :meth:`DSSCobuildConversation.answer_confirmation`, and
32
+ :meth:`DSSCobuildConversation.answer_question`.
32
33
  """
33
34
 
34
35
  @property
@@ -44,12 +45,14 @@ class CobuildAssistantResponse(CobuildMessage):
44
45
  def type(self):
45
46
  """
46
47
  Type of the response: ``"assistant_message"``, ``"delete_confirmation_request"``,
47
- or ``"error"``.
48
+ ``"ask_question_to_user_request"``, or ``"error"``.
48
49
 
49
50
  - ``"assistant_message"``: the assistant has completed its turn; the conversation is idle.
50
51
  - ``"delete_confirmation_request"``: the assistant is requesting confirmation before
51
52
  deleting objects. Call :meth:`DSSCobuildConversation.answer_confirmation`
52
53
  with a choice of ``"APPROVE"`` or ``"CANCEL"`` to continue.
54
+ - ``"ask_question_to_user_request"``: the assistant is requesting an explicit answer before it can
55
+ continue. Call :meth:`DSSCobuildConversation.answer_question` to continue.
53
56
  - ``"error"``: an error occurred while processing the Cobuild turn. In the public API,
54
57
  missing tool permissions are reported through this error response too.
55
58
 
@@ -82,6 +85,16 @@ class CobuildAssistantResponse(CobuildMessage):
82
85
  """
83
86
  return self.type == "delete_confirmation_request"
84
87
 
88
+ @property
89
+ def is_question_request(self):
90
+ """
91
+ Whether the assistant is requesting an explicit answer before continuing.
92
+ If ``True``, call :meth:`DSSCobuildConversation.answer_question`.
93
+
94
+ :rtype: bool
95
+ """
96
+ return self.type == "ask_question_to_user_request"
97
+
85
98
  @property
86
99
  def is_error(self):
87
100
  """
@@ -116,6 +129,72 @@ class CobuildAssistantResponse(CobuildMessage):
116
129
  """
117
130
  return self._raw.get("deletionImpacts")
118
131
 
132
+ @property
133
+ def question_id(self):
134
+ """
135
+ For ``"ask_question_to_user_request"`` responses: the identifier of the pending question.
136
+
137
+ ``None`` for other response types.
138
+
139
+ :rtype: str or None
140
+ """
141
+ return self._raw.get("questionId")
142
+
143
+ @property
144
+ def title(self):
145
+ """
146
+ For ``"ask_question_to_user_request"`` responses: the short question shown to the user.
147
+
148
+ ``None`` for other response types.
149
+
150
+ :rtype: str or None
151
+ """
152
+ return self._raw.get("title")
153
+
154
+ @property
155
+ def predefined_answers(self):
156
+ """
157
+ For ``"ask_question_to_user_request"`` responses: the list of predefined answers proposed by Cobuild.
158
+
159
+ ``None`` for other response types.
160
+
161
+ :rtype: list[str] or None
162
+ """
163
+ return self._raw.get("predefinedAnswers")
164
+
165
+ @property
166
+ def allow_custom_answer(self):
167
+ """
168
+ For ``"ask_question_to_user_request"`` responses: whether a custom free-text answer is allowed.
169
+
170
+ ``None`` for other response types.
171
+
172
+ :rtype: bool or None
173
+ """
174
+ return self._raw.get("allowCustomAnswer")
175
+
176
+ @property
177
+ def allow_multiple_answers(self):
178
+ """
179
+ For ``"ask_question_to_user_request"`` responses: whether multiple answers can be selected.
180
+
181
+ ``None`` for other response types.
182
+
183
+ :rtype: bool or None
184
+ """
185
+ return self._raw.get("allowMultipleAnswers")
186
+
187
+ @property
188
+ def default_answer_set(self):
189
+ """
190
+ For ``"ask_question_to_user_request"`` responses: whether Cobuild suggested a default answer.
191
+
192
+ ``None`` for other response types.
193
+
194
+ :rtype: bool or None
195
+ """
196
+ return self._raw.get("selectFirstAnswerByDefault")
197
+
119
198
  def __repr__(self):
120
199
  return "CobuildAssistantResponse(type=%r, message=%r)" % (self.type, self.message)
121
200
 
@@ -127,7 +206,8 @@ class CobuildUserMessage(CobuildMessage):
127
206
  .. important::
128
207
  Do not create this class directly, it is automatically created when using :meth:`dataikuapi.dss.project.DSSProject.new_cobuild_conversation`,
129
208
  :meth:`DSSCobuildConversation.send_message`, and
130
- :meth:`DSSCobuildConversation.answer_confirmation`.
209
+ :meth:`DSSCobuildConversation.answer_confirmation`, and
210
+ :meth:`DSSCobuildConversation.answer_question`.
131
211
  """
132
212
 
133
213
  @property
@@ -142,10 +222,12 @@ class CobuildUserMessage(CobuildMessage):
142
222
  @property
143
223
  def type(self):
144
224
  """
145
- Type of the message: ``"request"`` or ``"delete_confirmation_response"``.
225
+ Type of the message: ``"request"``, ``"delete_confirmation_response"``, or
226
+ ``"ask_question_to_user_response"``.
146
227
 
147
228
  - ``"request"``: a normal message sent to cobuild.
148
229
  - ``"delete_confirmation_response"``: user response when cobuild requests confirmation before deleting objects
230
+ - ``"ask_question_to_user_response"``: user response when cobuild requests an explicit answer
149
231
 
150
232
  :rtype: str
151
233
  """
@@ -160,6 +242,15 @@ class CobuildUserMessage(CobuildMessage):
160
242
  """
161
243
  return self.type == "delete_confirmation_response"
162
244
 
245
+ @property
246
+ def is_question_response(self):
247
+ """
248
+ Whether this message is the answer for assistant requesting an explicit answer.
249
+
250
+ :rtype: bool
251
+ """
252
+ return self.type == "ask_question_to_user_response"
253
+
163
254
  def __repr__(self):
164
255
  return "CobuildUserMessage(type=%r, message=%r)" % (self.type, self.message)
165
256
 
@@ -217,6 +308,31 @@ class DSSCobuildConversation(object):
217
308
  response = conv.answer_confirmation("APPROVE")
218
309
  print(response.message)
219
310
 
311
+ When the assistant needs an explicit answer, it asks a question::
312
+
313
+ response = conv.send_message("Use the best date column for sorting")
314
+ if response.is_question_request:
315
+ print("Question:", response.title)
316
+ print("Choices:", response.predefined_answers)
317
+ print("Allow custom answer:", response.allow_custom_answer)
318
+ response = conv.answer_question(
319
+ answers=["OrderDate"],
320
+ rejected=False,
321
+ used_custom_answer=False
322
+ )
323
+ print(response.message)
324
+
325
+ You can also decline answering a question::
326
+
327
+ response = conv.send_message("Pick the dataset to build")
328
+ if response.is_question_request:
329
+ response = conv.answer_question(
330
+ answers=[],
331
+ rejected=True,
332
+ used_custom_answer=False
333
+ )
334
+ print(response.message)
335
+
220
336
  If a tool requires edit permission, pass ``allow_edit_project=True`` to
221
337
  :meth:`send_message` to allow Cobuild to create and edit objects for that message.
222
338
  """
@@ -227,6 +343,7 @@ class DSSCobuildConversation(object):
227
343
  self.conversation_id = conversation_id
228
344
  self._messages = []
229
345
  self._pending_confirmation_id = None
346
+ self._pending_question_id = None
230
347
  self._selected_objects = selected_objects
231
348
 
232
349
  @property
@@ -273,6 +390,7 @@ class DSSCobuildConversation(object):
273
390
  )
274
391
  response = CobuildAssistantResponse(raw)
275
392
  self._pending_confirmation_id = raw["confirmationId"] if response.is_confirmation_request else None
393
+ self._pending_question_id = raw["questionId"] if response.is_question_request else None
276
394
  self._messages.append(response)
277
395
  return response
278
396
 
@@ -313,5 +431,51 @@ class DSSCobuildConversation(object):
313
431
  )
314
432
  response = CobuildAssistantResponse(raw)
315
433
  self._pending_confirmation_id = raw["confirmationId"] if response.is_confirmation_request else None
434
+ self._pending_question_id = raw["questionId"] if response.is_question_request else None
435
+ self._messages.append(response)
436
+ return response
437
+
438
+ def answer_question(self, answers=None, rejected=False, used_custom_answer=False):
439
+ """
440
+ Answer a pending question request and wait for the assistant's next response.
441
+
442
+ Call this after receiving a response with :attr:`~CobuildAssistantResponse.is_question_request`
443
+ set to ``True``.
444
+
445
+ The answer and assistant response are appended to :attr:`messages`.
446
+
447
+ :param list[str] answers: answers selected or entered by the user. Use an empty list when
448
+ ``rejected=True``. Defaults to ``[]``.
449
+ :param bool rejected: whether to decline answering the question
450
+ :param bool used_custom_answer: whether one of the answers came from the custom free-text input
451
+
452
+ :returns: the assistant's response after the question answer
453
+ :rtype: :class:`CobuildAssistantResponse`
454
+ """
455
+ if answers is None:
456
+ answers = []
457
+ if not isinstance(answers, list):
458
+ raise ValueError("answers must be a list of strings")
459
+ if self._pending_question_id is None:
460
+ raise ValueError("No pending question request. Call send_message first and check is_question_request.")
461
+
462
+ question_id = self._pending_question_id
463
+ self._pending_question_id = None
464
+ self._messages.append(CobuildUserMessage({
465
+ "type": "ask_question_to_user_response",
466
+ "message": None if rejected else ", ".join(answers),
467
+ }))
468
+ raw = self.client._perform_json(
469
+ "POST",
470
+ "/projects/%s/cobuild/conversations/%s/question/%s" % (self.project_key, self.conversation_id, question_id),
471
+ body={
472
+ "rejected": rejected,
473
+ "answers": answers,
474
+ "usedCustomAnswer": used_custom_answer,
475
+ },
476
+ )
477
+ response = CobuildAssistantResponse(raw)
478
+ self._pending_confirmation_id = raw["confirmationId"] if response.is_confirmation_request else None
479
+ self._pending_question_id = raw["questionId"] if response.is_question_request else None
316
480
  self._messages.append(response)
317
481
  return response
@@ -115,6 +115,16 @@ class DSSKnowledgeBank(object):
115
115
  """
116
116
  return self.client._perform_empty("DELETE", "/projects/%s/knowledge-banks/%s" % (self.project_key, self.id))
117
117
 
118
+ def clear(self):
119
+ """
120
+ Clear data in this knowledge bank.
121
+
122
+ :returns: a dict containing the method call status.
123
+ :rtype: dict
124
+ """
125
+ return self.client._perform_json(
126
+ "POST", "/projects/%s/knowledge-banks/%s/clear" % (self.project_key, self.id))
127
+
118
128
  def build(self, job_type="NON_RECURSIVE_FORCED_BUILD", wait=True):
119
129
  """
120
130
  Start a new job to build this knowledge bank and wait for it to complete.
@@ -449,18 +459,17 @@ class DSSKnowledgeBankSearchResultDocument(object):
449
459
 
450
460
  folder_smart_id = source_file_info.get("folder_ref")
451
461
  folder_full_id = source_file_info.get("folder_full_id") # deprecated but to support existing KBs
452
- folder_loc = None
453
462
 
454
463
  if folder_smart_id is not None:
455
464
  try:
456
- folder_loc = AnyLoc.from_ref("donotmatter", folder_smart_id) # unused, just to check format
465
+ _ = AnyLoc.from_ref("donotmatter", folder_smart_id) # unused, just to check format
457
466
  return ManagedFolderDocumentRef(path, folder_smart_id)
458
467
  except ValueError as e:
459
468
  logger.error("Invalid folder_ref in DKU_DOCUMENT_INFO: {}, {}".format(e, document_info))
460
469
  return None
461
470
  elif folder_full_id is not None:
462
471
  try:
463
- folder_loc = AnyLoc.from_full(folder_full_id) # unused, just to check format
472
+ _ = AnyLoc.from_full(folder_full_id) # unused, just to check format
464
473
  return ManagedFolderDocumentRef(path, folder_full_id)
465
474
  except ValueError as e:
466
475
  logger.error("Invalid folder_full_id in DKU_DOCUMENT_INFO: {}, {}".format(e, document_info))
@@ -8,7 +8,10 @@ from ...utils import DataikuException
8
8
  _footer_attributes = [
9
9
  # usage metadata
10
10
  "promptTokens",
11
+ "cacheReadInputTokens",
12
+ "cacheWriteInputTokens",
11
13
  "completionTokens",
14
+ "reasoningTokens",
12
15
  "totalTokens",
13
16
  "totalUsage",
14
17
  "tokenCountsAreEstimated",
@@ -3244,6 +3244,23 @@ class DSSProject(object):
3244
3244
  response = conv.send_message("Update wiki article 123 to add a one-line banner")
3245
3245
  print(response.message)
3246
3246
 
3247
+ Cobuild can also pause and request an explicit answer before continuing::
3248
+
3249
+ project = client.get_project("MY_PROJECT")
3250
+ conv = project.new_cobuild_conversation()
3251
+
3252
+ response = conv.send_message("Use the best date column for sorting")
3253
+ if response.is_question_request:
3254
+ print("Question:", response.title)
3255
+ print("Choices:", response.predefined_answers)
3256
+ print("Allow custom answer:", response.allow_custom_answer)
3257
+ response = conv.answer_question(
3258
+ answers=["OrderDate"],
3259
+ rejected=False,
3260
+ used_custom_answer=False
3261
+ )
3262
+ print(response.message)
3263
+
3247
3264
  :returns: a handle to the newly created empty conversation
3248
3265
  :rtype: :class:`dataikuapi.dss.cobuild.DSSCobuildConversation`
3249
3266
  """
@@ -98,6 +98,21 @@ class DSSRecipe(object):
98
98
  """
99
99
  return self.recipe_name
100
100
 
101
+ @property
102
+ def type(self):
103
+ """
104
+ Get the type of the recipe.
105
+
106
+ :return: a recipe type, for example 'sync' or 'join'
107
+ :rtype: string
108
+ """
109
+ return self._get_recipe_data()["recipe"]["type"]
110
+
111
+ def _get_recipe_data(self):
112
+ return self.client._perform_json(
113
+ "GET", "/projects/%s/recipes/%s" % (self.project_key, self.recipe_name)
114
+ )
115
+
101
116
  def compute_schema_updates(self):
102
117
  """
103
118
  Computes which updates are required to the outputs of this recipe.
@@ -212,57 +227,56 @@ class DSSRecipe(object):
212
227
 
213
228
  :rtype: :class:`DSSRecipeSettings` or a subclass
214
229
  """
215
- data = self.client._perform_json(
216
- "GET", "/projects/%s/recipes/%s" % (self.project_key, self.recipe_name))
217
- type = data["recipe"]["type"]
230
+ data = self._get_recipe_data()
231
+ recipe_type = data["recipe"]["type"]
218
232
 
219
- if type == "generate_features":
233
+ if recipe_type == "generate_features":
220
234
  return GenerateFeaturesRecipeSettings(self, data)
221
- if type == "grouping":
235
+ if recipe_type == "grouping":
222
236
  return GroupingRecipeSettings(self, data)
223
- if type == "upsert":
237
+ if recipe_type == "upsert":
224
238
  return UpsertRecipeSettings(self, data)
225
- elif type == "window":
239
+ elif recipe_type == "window":
226
240
  return WindowRecipeSettings(self, data)
227
- elif type == "sync":
241
+ elif recipe_type == "sync":
228
242
  return SyncRecipeSettings(self, data)
229
- elif type == "pivot":
243
+ elif recipe_type == "pivot":
230
244
  return PivotRecipeSettings(self, data)
231
- elif type == "sort":
245
+ elif recipe_type == "sort":
232
246
  return SortRecipeSettings(self, data)
233
- elif type == "topn":
247
+ elif recipe_type == "topn":
234
248
  return TopNRecipeSettings(self, data)
235
- elif type == "distinct":
249
+ elif recipe_type == "distinct":
236
250
  return DistinctRecipeSettings(self, data)
237
- elif type == "join":
251
+ elif recipe_type == "join":
238
252
  return JoinRecipeSettings(self, data)
239
- elif type == "vstack":
253
+ elif recipe_type == "vstack":
240
254
  return StackRecipeSettings(self, data)
241
- elif type == "sampling":
255
+ elif recipe_type == "sampling":
242
256
  return SamplingRecipeSettings(self, data)
243
- elif type == "split":
257
+ elif recipe_type == "split":
244
258
  return SplitRecipeSettings(self, data, self.client.get_project(self.project_key))
245
- elif type == "prepare" or type == "shaker":
259
+ elif recipe_type == "prepare" or recipe_type == "shaker":
246
260
  return PrepareRecipeSettings(self, data)
247
- #elif type == "prediction_scoring":
248
- #elif type == "clustering_scoring":
249
- elif type == "download":
261
+ #elif recipe_type == "prediction_scoring":
262
+ #elif recipe_type == "clustering_scoring":
263
+ elif recipe_type == "download":
250
264
  return DownloadRecipeSettings(self, data)
251
- elif type == 'export':
265
+ elif recipe_type == 'export':
252
266
  return ExportRecipeSettings(self, data)
253
- #elif type == "sql_query":
267
+ #elif recipe_type == "sql_query":
254
268
  # return WindowRecipeSettings(self, data)
255
- elif type in ["python", "r", "sql_script", "pyspark", "sparkr", "spark_scala", "shell", "spark_sql_query"]:
269
+ elif recipe_type in ["python", "r", "sql_script", "pyspark", "sparkr", "spark_scala", "shell", "spark_sql_query"]:
256
270
  return CodeRecipeSettings(self, data)
257
- elif type == "nlp_llm_rag_embedding":
271
+ elif recipe_type == "nlp_llm_rag_embedding":
258
272
  return EmbedDatasetRecipeSettings(self, data)
259
- elif type == "embed_documents":
273
+ elif recipe_type == "embed_documents":
260
274
  return EmbedDocumentsRecipeSettings(self, data)
261
- elif type == "extract_content":
275
+ elif recipe_type == "extract_content":
262
276
  return ExtractContentRecipeSettings(self, data)
263
- elif type == "extract_fields":
277
+ elif recipe_type == "extract_fields":
264
278
  return ExtractFieldsRecipeSettings(self, data)
265
- elif type == "prompt":
279
+ elif recipe_type == "prompt":
266
280
  return PromptRecipeSettings(self, data)
267
281
  else:
268
282
  return DSSRecipeSettings(self, data)
@@ -80,6 +80,51 @@ class DSSRetrievalAugmentedLLM(object):
80
80
  """
81
81
  return self.client._perform_empty("DELETE", "/projects/%s/retrieval-augmented-llms/%s" % (self.project_key, self.id))
82
82
 
83
+ def get_metrics_series(self, from_timestamp_ms=None, to_timestamp_ms=None, aggregation="MINUTE", timezone=None):
84
+ """
85
+ Get the operational metrics series for this retrieval-augmented LLM.
86
+
87
+ The returned payload may include the ongoing interval for the requested granularity.
88
+ As a consequence, the latest datapoint is temporarily inconsistent and may evolve
89
+ as more raw events are flushed and aggregated at read time.
90
+ The requested time window is aligned to the bucket boundaries of the selected
91
+ aggregation before being read.
92
+
93
+ :param int from_timestamp_ms: Beginning of the requested window, inclusive, as an
94
+ epoch timestamp in milliseconds. The effective lower bound is rounded down
95
+ to the start of its bucket. Optional, defaults to the oldest retained
96
+ timestamp available for the requested aggregation.
97
+ :param int to_timestamp_ms: End of the requested window, exclusive, as an epoch
98
+ timestamp in milliseconds. The effective upper bound is rounded up to the
99
+ next bucket boundary when it falls inside a bucket.
100
+ Optional, defaults to the current time when omitted.
101
+ :param str aggregation: Aggregation granularity. Supported values are ``MINUTE``,
102
+ ``FIVE_MINUTES``, ``HOUR``, ``DAY`` and ``MONTH``.
103
+ :param str timezone: Timezone used to align bucket boundaries. Optional,
104
+ defaults to ``UTC``. Can be a timezone name like ``Europe/Paris``.
105
+ :return: The list of datapoints. Each datapoint contains a ``timestampMs``
106
+ expressed as the start timestamp of its bucket in epoch
107
+ milliseconds. For example, with ``HOUR`` aggregation, a datapoint
108
+ at ``18:00`` represents the interval ``[18:00, 19:00)``.
109
+ :rtype: list[dict]
110
+ """
111
+ if from_timestamp_ms is not None and not isinstance(from_timestamp_ms, int):
112
+ raise TypeError("Expected int for from_timestamp_ms, got %s" % type(from_timestamp_ms).__name__)
113
+ if to_timestamp_ms is not None and not isinstance(to_timestamp_ms, int):
114
+ raise TypeError("Expected int for to_timestamp_ms, got %s" % type(to_timestamp_ms).__name__)
115
+ if timezone is not None and not isinstance(timezone, str):
116
+ raise TypeError("Expected str for timezone, got %s" % type(timezone).__name__)
117
+
118
+ return self.client._perform_json(
119
+ "GET", "/projects/%s/retrieval-augmented-llms/%s/operational-metrics/series" % (self.project_key, self.id),
120
+ params={
121
+ "fromTimestampMs": from_timestamp_ms,
122
+ "toTimestampMs": to_timestamp_ms,
123
+ "aggregation": aggregation,
124
+ "timezone": timezone
125
+ }
126
+ )
127
+
83
128
  class DSSRetrievalAugmentedLLMSettings(DSSTaggableObjectSettings):
84
129
  """
85
130
  Settings for a retrieval-augmented LLM
@@ -2,7 +2,7 @@
2
2
 
3
3
  from setuptools import setup
4
4
 
5
- VERSION = "14.7.1"
5
+ VERSION = "14.7.2"
6
6
 
7
7
  long_description = (open('README').read() + '\n\n' +
8
8
  open('HISTORY.txt').read())