truefoundry 0.5.10rc1__py3-none-any.whl → 0.5.10rc2__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 truefoundry might be problematic. Click here for more details.
- truefoundry/cli/display_util.py +1 -1
- truefoundry/deploy/auto_gen/models.py +1 -1
- truefoundry/deploy/io/output_callback.py +13 -6
- truefoundry/deploy/io/rich_output_callback.py +8 -4
- truefoundry/deploy/lib/clients/servicefoundry_client.py +78 -105
- truefoundry/deploy/lib/dao/apply.py +2 -2
- truefoundry/deploy/lib/dao/delete.py +2 -2
- truefoundry/deploy/lib/model/entity.py +37 -24
- truefoundry/ml/autogen/client/__init__.py +22 -14
- truefoundry/ml/autogen/client/api/auth_api.py +2 -2
- truefoundry/ml/autogen/client/api/deprecated_api.py +5 -338
- truefoundry/ml/autogen/client/api/experiments_api.py +77 -32
- truefoundry/ml/autogen/client/api/generate_code_snippet_api.py +2 -2
- truefoundry/ml/autogen/client/api/health_api.py +2 -2
- truefoundry/ml/autogen/client/api/metrics_api.py +4 -4
- truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +530 -140
- truefoundry/ml/autogen/client/api/run_artifacts_api.py +10 -5
- truefoundry/ml/autogen/client/api/runs_api.py +20 -20
- truefoundry/ml/autogen/client/api_client.py +2 -2
- truefoundry/ml/autogen/client/configuration.py +29 -57
- truefoundry/ml/autogen/client/exceptions.py +2 -2
- truefoundry/ml/autogen/client/models/__init__.py +22 -14
- truefoundry/ml/autogen/client/models/agent_app.py +13 -5
- truefoundry/ml/autogen/client/models/{agent.py → agent_manifest.py} +39 -30
- truefoundry/ml/autogen/client/models/{agent_open_api_tool.py → agent_open_api_tool_manifest.py} +50 -31
- truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +47 -26
- truefoundry/ml/autogen/client/models/agent_with_fqn.py +36 -25
- truefoundry/ml/autogen/client/models/{add_custom_metrics_to_model_version_request_dto.py → apply_request_dto.py} +23 -17
- truefoundry/ml/autogen/client/models/apply_response_dto.py +79 -0
- truefoundry/ml/autogen/client/models/artifact_dto.py +2 -2
- truefoundry/ml/autogen/client/models/{add_features_to_model_version_request_dto.py → artifact_path.py} +20 -17
- truefoundry/ml/autogen/client/models/artifact_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/artifact_type.py +3 -3
- truefoundry/ml/autogen/client/models/artifact_version_dto.py +7 -15
- truefoundry/ml/autogen/client/models/artifact_version_manifest.py +32 -19
- truefoundry/ml/autogen/client/models/artifact_version_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/artifact_version_serialization_format.py +2 -2
- truefoundry/ml/autogen/client/models/artifact_version_status.py +2 -2
- truefoundry/ml/autogen/client/models/assistant_message.py +9 -5
- truefoundry/ml/autogen/client/models/authorize_user_for_model_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/authorize_user_for_model_version_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/blob_storage_reference.py +4 -4
- truefoundry/ml/autogen/client/models/body_get_search_runs_get.py +2 -2
- truefoundry/ml/autogen/client/models/{chat_prompt.py → chat_prompt_manifest.py} +39 -32
- truefoundry/ml/autogen/client/models/{chat_prompt_messages_inner.py → chat_prompt_manifest_messages_inner.py} +12 -12
- truefoundry/ml/autogen/client/models/columns_dto.py +2 -2
- truefoundry/ml/autogen/client/models/command.py +2 -2
- truefoundry/ml/autogen/client/models/content.py +3 -3
- truefoundry/ml/autogen/client/models/content1.py +3 -3
- truefoundry/ml/autogen/client/models/content2.py +3 -3
- truefoundry/ml/autogen/client/models/content2_any_of_inner.py +2 -2
- truefoundry/ml/autogen/client/models/create_artifact_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_artifact_version_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_dataset_request_dto.py +21 -5
- truefoundry/ml/autogen/client/models/create_experiment_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_experiment_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_model_version_request_dto.py +4 -12
- truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_multi_part_upload_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_run_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_run_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/create_workflow_task_config_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/data_directory_manifest.py +126 -0
- truefoundry/ml/autogen/client/models/dataset_dto.py +13 -2
- truefoundry/ml/autogen/client/models/dataset_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/delete_artifact_versions_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/delete_dataset_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/delete_files_for_dataset_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/delete_model_version_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/delete_run_request.py +2 -2
- truefoundry/ml/autogen/client/models/delete_tag_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/experiment_dto.py +3 -3
- truefoundry/ml/autogen/client/models/experiment_id_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/experiment_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/experiment_tag_dto.py +2 -2
- truefoundry/ml/autogen/client/models/export_deployment_files_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/external_blob_storage_source.py +5 -4
- truefoundry/ml/autogen/client/models/fast_ai_framework.py +3 -3
- truefoundry/ml/autogen/client/models/file_info_dto.py +2 -2
- truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +7 -15
- truefoundry/ml/autogen/client/models/framework.py +3 -3
- truefoundry/ml/autogen/client/models/get_artifact_version_aliases_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_experiment_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_metric_history_response.py +2 -2
- truefoundry/ml/autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/gluon_framework.py +3 -3
- truefoundry/ml/autogen/client/models/h2_o_framework.py +3 -3
- truefoundry/ml/autogen/client/models/http_validation_error.py +2 -2
- truefoundry/ml/autogen/client/models/image_content_part.py +7 -5
- truefoundry/ml/autogen/client/models/image_url.py +3 -3
- truefoundry/ml/autogen/client/models/infer_method_name.py +2 -2
- truefoundry/ml/autogen/client/models/keras_framework.py +3 -3
- truefoundry/ml/autogen/client/models/latest_run_log_dto.py +2 -2
- truefoundry/ml/autogen/client/models/library_name.py +2 -2
- truefoundry/ml/autogen/client/models/light_gbm_framework.py +3 -3
- truefoundry/ml/autogen/client/models/list_artifact_versions_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_artifact_versions_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_artifacts_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_artifacts_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_colums_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_datasets_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_datasets_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_experiments_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_files_for_artifact_version_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_files_for_artifact_versions_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_files_for_dataset_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_files_for_dataset_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_latest_run_logs_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_metric_history_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_metric_history_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_model_version_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_model_versions_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_models_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_models_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_run_artifacts_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/list_run_logs_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/local_artifact_source.py +93 -0
- truefoundry/ml/autogen/client/models/local_model_source.py +80 -0
- truefoundry/ml/autogen/client/models/log_batch_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/log_metric_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/log_param_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/manifest.py +100 -23
- truefoundry/ml/autogen/client/models/manifest1.py +219 -0
- truefoundry/ml/autogen/client/models/manifest2.py +198 -0
- truefoundry/ml/autogen/client/models/method.py +3 -3
- truefoundry/ml/autogen/client/models/metric_collection_dto.py +2 -2
- truefoundry/ml/autogen/client/models/metric_dto.py +2 -2
- truefoundry/ml/autogen/client/models/mime_type.py +2 -2
- truefoundry/ml/autogen/client/models/model_configuration.py +7 -7
- truefoundry/ml/autogen/client/models/model_dto.py +2 -2
- truefoundry/ml/autogen/client/models/model_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/model_server.py +2 -2
- truefoundry/ml/autogen/client/models/model_version_dto.py +2 -2
- truefoundry/ml/autogen/client/models/model_version_environment.py +5 -5
- truefoundry/ml/autogen/client/models/model_version_manifest.py +35 -22
- truefoundry/ml/autogen/client/models/model_version_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/multi_part_upload_dto.py +2 -2
- truefoundry/ml/autogen/client/models/multi_part_upload_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/multi_part_upload_storage_provider.py +2 -2
- truefoundry/ml/autogen/client/models/notify_artifact_version_failure_dto.py +2 -2
- truefoundry/ml/autogen/client/models/onnx_framework.py +3 -3
- truefoundry/ml/autogen/client/models/openapi_spec.py +3 -3
- truefoundry/ml/autogen/client/models/paddle_framework.py +3 -3
- truefoundry/ml/autogen/client/models/param_dto.py +2 -2
- truefoundry/ml/autogen/client/models/parameters.py +3 -3
- truefoundry/ml/autogen/client/models/py_torch_framework.py +3 -3
- truefoundry/ml/autogen/client/models/resolve_agent_app_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/restore_run_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/run_data_dto.py +2 -2
- truefoundry/ml/autogen/client/models/run_dto.py +2 -2
- truefoundry/ml/autogen/client/models/run_info_dto.py +2 -2
- truefoundry/ml/autogen/client/models/run_log_dto.py +2 -2
- truefoundry/ml/autogen/client/models/run_log_input_dto.py +2 -2
- truefoundry/ml/autogen/client/models/run_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/run_tag_dto.py +2 -2
- truefoundry/ml/autogen/client/models/search_runs_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/search_runs_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/set_experiment_tag_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/set_tag_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/signed_url_dto.py +2 -2
- truefoundry/ml/autogen/client/models/sklearn_framework.py +4 -4
- truefoundry/ml/autogen/client/models/sklearn_model_schema.py +7 -5
- truefoundry/ml/autogen/client/models/sklearn_serialization_format.py +3 -3
- truefoundry/ml/autogen/client/models/source.py +32 -7
- truefoundry/ml/autogen/client/models/source1.py +3 -3
- truefoundry/ml/autogen/client/models/{internal_metadata.py → source2.py} +52 -55
- truefoundry/ml/autogen/client/models/spa_cy_framework.py +3 -3
- truefoundry/ml/autogen/client/models/stats_models_framework.py +3 -3
- truefoundry/ml/autogen/client/models/stop.py +2 -2
- truefoundry/ml/autogen/client/models/store_run_logs_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/subject.py +2 -2
- truefoundry/ml/autogen/client/models/subject_type.py +2 -2
- truefoundry/ml/autogen/client/models/system_message.py +7 -4
- truefoundry/ml/autogen/client/models/tensor_flow_framework.py +3 -3
- truefoundry/ml/autogen/client/models/text.py +3 -3
- truefoundry/ml/autogen/client/models/text_content_part.py +6 -4
- truefoundry/ml/autogen/client/models/transformers_framework.py +5 -5
- truefoundry/ml/autogen/client/models/trigger_job_run_config_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/trigger_job_run_config_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/true_foundry_managed_source.py +3 -3
- truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +5 -7
- truefoundry/ml/autogen/client/models/update_dataset_request_dto.py +13 -3
- truefoundry/ml/autogen/client/models/update_experiment_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/update_run_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/update_run_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/url.py +3 -3
- truefoundry/ml/autogen/client/models/user_message.py +8 -5
- truefoundry/ml/autogen/client/models/validate_external_storage_root_request_dto.py +2 -2
- truefoundry/ml/autogen/client/models/validate_external_storage_root_response_dto.py +2 -2
- truefoundry/ml/autogen/client/models/validation_error.py +2 -2
- truefoundry/ml/autogen/client/models/validation_error_loc_inner.py +2 -2
- truefoundry/ml/autogen/client/models/xg_boost_framework.py +4 -4
- truefoundry/ml/autogen/client/models/xg_boost_model_schema.py +7 -5
- truefoundry/ml/autogen/client/models/xg_boost_serialization_format.py +3 -3
- truefoundry/ml/autogen/client/rest.py +2 -2
- truefoundry/ml/autogen/client_README.md +17 -19
- truefoundry/ml/autogen/entities/artifacts.py +264 -139
- truefoundry/ml/clients/servicefoundry_client.py +3 -2
- truefoundry/ml/log_types/artifacts/artifact.py +15 -78
- truefoundry/ml/log_types/artifacts/model.py +4 -5
- truefoundry/ml/log_types/artifacts/utils.py +18 -2
- truefoundry/ml/mlfoundry_api.py +0 -40
- {truefoundry-0.5.10rc1.dist-info → truefoundry-0.5.10rc2.dist-info}/METADATA +1 -1
- {truefoundry-0.5.10rc1.dist-info → truefoundry-0.5.10rc2.dist-info}/RECORD +221 -215
- {truefoundry-0.5.10rc1.dist-info → truefoundry-0.5.10rc2.dist-info}/WHEEL +0 -0
- {truefoundry-0.5.10rc1.dist-info → truefoundry-0.5.10rc2.dist-info}/entry_points.txt +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
TrueFoundry ML API
|
|
5
5
|
|
|
6
6
|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -22,57 +22,65 @@ from truefoundry.pydantic_v1 import (
|
|
|
22
22
|
BaseModel,
|
|
23
23
|
Field,
|
|
24
24
|
StrictStr,
|
|
25
|
+
conint,
|
|
25
26
|
conlist,
|
|
26
27
|
constr,
|
|
27
28
|
validator,
|
|
28
29
|
)
|
|
29
30
|
|
|
30
31
|
|
|
31
|
-
class
|
|
32
|
+
class AgentManifest(BaseModel):
|
|
32
33
|
"""
|
|
33
|
-
Agent
|
|
34
|
+
Agent manifest. # noqa: E501
|
|
34
35
|
"""
|
|
35
36
|
|
|
37
|
+
name: Optional[constr(strict=True, max_length=256)] = Field(
|
|
38
|
+
default=None,
|
|
39
|
+
description="+sort=1 +label=Name +message=The name should start with lowercase alphabets and can contain alphanumeric and can include '-' in between +usage=Name of the entity",
|
|
40
|
+
)
|
|
36
41
|
description: Optional[constr(strict=True, max_length=512)] = Field(
|
|
37
42
|
default=None, description="+sort=2 +label=Description"
|
|
38
43
|
)
|
|
39
44
|
metadata: Dict[str, Any] = Field(
|
|
40
45
|
default=...,
|
|
41
|
-
description=
|
|
46
|
+
description='+label=Metadata +usage=Key value metadata. Should be valid JSON. For e.g. `{"business-unit": "sales", "quality": "good", "rating": 4.5}` +uiType=JsonInput +uiProps={"descriptionInline":true}',
|
|
42
47
|
)
|
|
43
48
|
version_alias: Optional[constr(strict=True, max_length=128)] = Field(
|
|
44
49
|
default=None,
|
|
45
|
-
description=
|
|
50
|
+
description='+label=Version Alias +usage=Version alias is alternate, ideally human readable, version string to reference an artifact version. It should start with `v` followed by alphanumeric and it can include `.` and `-` in between (e.g. `v1.0.0`, `v1-prod`, `v3-dev`, etc) +message=The version alias should start with `v` followed by alphanumeric and can include `.` and `-` in between (e.g. `v1.0.0`, `v1-prod`, `v3-dev`, etc) +uiProps={"descriptionInline":true} +placeholder=v1.0.0',
|
|
46
51
|
)
|
|
47
|
-
|
|
52
|
+
ml_repo: Optional[constr(strict=True)] = Field(
|
|
48
53
|
default=None,
|
|
49
|
-
description="+
|
|
54
|
+
description="+label=ML Repo +usage=Name of the ML Repo +uiType=Hidden",
|
|
50
55
|
)
|
|
51
|
-
|
|
56
|
+
version: Optional[conint(strict=True, ge=1)] = Field(
|
|
52
57
|
default=None,
|
|
53
|
-
description="+label=
|
|
58
|
+
description="+label=Version of the entity +usage=Version of the entity +uiType=Hidden",
|
|
54
59
|
)
|
|
55
60
|
type: Optional[StrictStr] = "agent"
|
|
56
61
|
available_tools: conlist(constr(strict=True, min_length=1)) = Field(
|
|
57
|
-
default=...,
|
|
62
|
+
default=...,
|
|
63
|
+
description='+sort=30 +uiType=Hidden +label=Tools +usage=Tools available to the agent +uiProps={"descriptionInline":true}',
|
|
58
64
|
)
|
|
59
65
|
goal: constr(strict=True, max_length=128, min_length=1) = Field(
|
|
60
|
-
default=...,
|
|
66
|
+
default=...,
|
|
67
|
+
description='+sort=10 +uiType=TextArea +label=Goal +usage=Short form description. Will be used as `description` when this agent is used as a tool. +uiProps={"descriptionInline":true}',
|
|
61
68
|
)
|
|
62
69
|
instruction: constr(strict=True, max_length=2620, min_length=1) = Field(
|
|
63
70
|
default=...,
|
|
64
|
-
description='`instruction` is the system prompt for now. (2.5 * 1024) +sort=20 +uiType=AgentInstructions +uiProps={"helpText":"Use the syntax ${Tool FQN} to reference a tool, and ${AGENT FQN} to reference another agent"}',
|
|
71
|
+
description='`instruction` is the system prompt for now. (2.5 * 1024) +sort=20 +uiType=AgentInstructions +uiProps={"helpText":"Use the syntax ${Tool FQN} to reference a tool, and ${AGENT FQN} to reference another agent"} +label=Instructions +usage=Instructions for the agent to follow to achieve the goal +uiProps={"descriptionInline":true}',
|
|
65
72
|
)
|
|
66
73
|
model_id: constr(strict=True, min_length=1) = Field(
|
|
67
74
|
default=...,
|
|
68
|
-
description='+sort=40 +uiType=EnabledModelSelector +uiProps={"searchable":true,"modelType":"chat","providerType":"openai"}',
|
|
75
|
+
description='+sort=40 +uiType=EnabledModelSelector +uiProps={"searchable":true,"modelType":"chat","providerType":"openai"} +label=Model +usage=Model to use when running the agent',
|
|
69
76
|
)
|
|
70
77
|
__properties = [
|
|
78
|
+
"name",
|
|
71
79
|
"description",
|
|
72
80
|
"metadata",
|
|
73
81
|
"version_alias",
|
|
74
|
-
"name",
|
|
75
82
|
"ml_repo",
|
|
83
|
+
"version",
|
|
76
84
|
"type",
|
|
77
85
|
"available_tools",
|
|
78
86
|
"goal",
|
|
@@ -80,27 +88,27 @@ class Agent(BaseModel):
|
|
|
80
88
|
"model_id",
|
|
81
89
|
]
|
|
82
90
|
|
|
83
|
-
@validator("
|
|
84
|
-
def
|
|
91
|
+
@validator("name")
|
|
92
|
+
def name_validate_regular_expression(cls, value):
|
|
85
93
|
"""Validates the regular expression"""
|
|
86
94
|
if value is None:
|
|
87
95
|
return value
|
|
88
96
|
|
|
89
|
-
if not re.match(r"^
|
|
97
|
+
if not re.match(r"^[A-Za-z0-9_\-]+$", value):
|
|
90
98
|
raise ValueError(
|
|
91
|
-
r"must validate the regular expression /^
|
|
99
|
+
r"must validate the regular expression /^[A-Za-z0-9_\-]+$/"
|
|
92
100
|
)
|
|
93
101
|
return value
|
|
94
102
|
|
|
95
|
-
@validator("
|
|
96
|
-
def
|
|
103
|
+
@validator("version_alias")
|
|
104
|
+
def version_alias_validate_regular_expression(cls, value):
|
|
97
105
|
"""Validates the regular expression"""
|
|
98
106
|
if value is None:
|
|
99
107
|
return value
|
|
100
108
|
|
|
101
|
-
if not re.match(r"^[
|
|
109
|
+
if not re.match(r"^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$", value):
|
|
102
110
|
raise ValueError(
|
|
103
|
-
r"must validate the regular expression /^[
|
|
111
|
+
r"must validate the regular expression /^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$/"
|
|
104
112
|
)
|
|
105
113
|
return value
|
|
106
114
|
|
|
@@ -141,8 +149,8 @@ class Agent(BaseModel):
|
|
|
141
149
|
return json.dumps(self.to_dict())
|
|
142
150
|
|
|
143
151
|
@classmethod
|
|
144
|
-
def from_json(cls, json_str: str) ->
|
|
145
|
-
"""Create an instance of
|
|
152
|
+
def from_json(cls, json_str: str) -> AgentManifest:
|
|
153
|
+
"""Create an instance of AgentManifest from a JSON string"""
|
|
146
154
|
return cls.from_dict(json.loads(json_str))
|
|
147
155
|
|
|
148
156
|
def to_dict(self):
|
|
@@ -151,21 +159,22 @@ class Agent(BaseModel):
|
|
|
151
159
|
return _dict
|
|
152
160
|
|
|
153
161
|
@classmethod
|
|
154
|
-
def from_dict(cls, obj: dict) ->
|
|
155
|
-
"""Create an instance of
|
|
162
|
+
def from_dict(cls, obj: dict) -> AgentManifest:
|
|
163
|
+
"""Create an instance of AgentManifest from a dict"""
|
|
156
164
|
if obj is None:
|
|
157
165
|
return None
|
|
158
166
|
|
|
159
167
|
if not isinstance(obj, dict):
|
|
160
|
-
return
|
|
168
|
+
return AgentManifest.parse_obj(obj)
|
|
161
169
|
|
|
162
|
-
_obj =
|
|
170
|
+
_obj = AgentManifest.parse_obj(
|
|
163
171
|
{
|
|
172
|
+
"name": obj.get("name"),
|
|
164
173
|
"description": obj.get("description"),
|
|
165
174
|
"metadata": obj.get("metadata"),
|
|
166
175
|
"version_alias": obj.get("version_alias"),
|
|
167
|
-
"name": obj.get("name"),
|
|
168
176
|
"ml_repo": obj.get("ml_repo"),
|
|
177
|
+
"version": obj.get("version"),
|
|
169
178
|
"type": obj.get("type") if obj.get("type") is not None else "agent",
|
|
170
179
|
"available_tools": obj.get("available_tools"),
|
|
171
180
|
"goal": obj.get("goal"),
|
truefoundry/ml/autogen/client/models/{agent_open_api_tool.py → agent_open_api_tool_manifest.py}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
TrueFoundry ML API
|
|
5
5
|
|
|
6
6
|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -20,51 +20,69 @@ from typing import Any, Dict, Optional
|
|
|
20
20
|
|
|
21
21
|
from truefoundry.ml.autogen.client.models.method import Method
|
|
22
22
|
from truefoundry.ml.autogen.client.models.openapi_spec import OpenapiSpec
|
|
23
|
-
from truefoundry.pydantic_v1 import
|
|
23
|
+
from truefoundry.pydantic_v1 import (
|
|
24
|
+
BaseModel,
|
|
25
|
+
Field,
|
|
26
|
+
StrictStr,
|
|
27
|
+
conint,
|
|
28
|
+
constr,
|
|
29
|
+
validator,
|
|
30
|
+
)
|
|
24
31
|
|
|
25
32
|
|
|
26
|
-
class
|
|
33
|
+
class AgentOpenAPIToolManifest(BaseModel):
|
|
27
34
|
"""
|
|
28
|
-
OpenAPI Tool
|
|
35
|
+
Agent OpenAPI Tool manifest. # noqa: E501
|
|
29
36
|
"""
|
|
30
37
|
|
|
38
|
+
name: Optional[constr(strict=True, max_length=256)] = Field(
|
|
39
|
+
default=None,
|
|
40
|
+
description="+sort=1 +label=Name +message=The name should start with lowercase alphabets and can contain alphanumeric and can include '-' in between +usage=Name of the entity",
|
|
41
|
+
)
|
|
31
42
|
description: Optional[constr(strict=True, max_length=512)] = Field(
|
|
32
43
|
default=None, description="+sort=2 +label=Description"
|
|
33
44
|
)
|
|
34
45
|
metadata: Dict[str, Any] = Field(
|
|
35
46
|
default=...,
|
|
36
|
-
description=
|
|
47
|
+
description='+label=Metadata +usage=Key value metadata. Should be valid JSON. For e.g. `{"business-unit": "sales", "quality": "good", "rating": 4.5}` +uiType=JsonInput +uiProps={"descriptionInline":true}',
|
|
37
48
|
)
|
|
38
49
|
version_alias: Optional[constr(strict=True, max_length=128)] = Field(
|
|
39
50
|
default=None,
|
|
40
|
-
description=
|
|
51
|
+
description='+label=Version Alias +usage=Version alias is alternate, ideally human readable, version string to reference an artifact version. It should start with `v` followed by alphanumeric and it can include `.` and `-` in between (e.g. `v1.0.0`, `v1-prod`, `v3-dev`, etc) +message=The version alias should start with `v` followed by alphanumeric and can include `.` and `-` in between (e.g. `v1.0.0`, `v1-prod`, `v3-dev`, etc) +uiProps={"descriptionInline":true} +placeholder=v1.0.0',
|
|
41
52
|
)
|
|
42
|
-
|
|
53
|
+
ml_repo: Optional[constr(strict=True)] = Field(
|
|
43
54
|
default=None,
|
|
44
|
-
description="+
|
|
55
|
+
description="+label=ML Repo +usage=Name of the ML Repo +uiType=Hidden",
|
|
45
56
|
)
|
|
46
|
-
|
|
57
|
+
version: Optional[conint(strict=True, ge=1)] = Field(
|
|
47
58
|
default=None,
|
|
48
|
-
description="+label=
|
|
59
|
+
description="+label=Version of the entity +usage=Version of the entity +uiType=Hidden",
|
|
49
60
|
)
|
|
50
61
|
type: Optional[StrictStr] = "openapi-tool"
|
|
51
62
|
openapi_spec: OpenapiSpec = Field(...)
|
|
52
|
-
base_url: constr(strict=True) = Field(
|
|
63
|
+
base_url: constr(strict=True) = Field(
|
|
64
|
+
default=...,
|
|
65
|
+
description='+sort=30 +label=Base URL +usage=HTTP endpoint where the API is hosted for the tools. E.g. `https://api.example.com/v1` +uiProps={"descriptionInline":true} +placeholder=https://api.example.com/v1',
|
|
66
|
+
)
|
|
53
67
|
path: constr(strict=True, min_length=1) = Field(
|
|
54
68
|
default=...,
|
|
55
|
-
description=
|
|
69
|
+
description='+sort=40 +uiType=MethodPathSelector +label=API Route Path +usage=API Route Path for the tool call HTTP request. E.g. `GET /weather` +uiProps={"descriptionInline":true}',
|
|
70
|
+
)
|
|
71
|
+
method: Method = Field(
|
|
72
|
+
default=...,
|
|
73
|
+
description="+sort=50 +uiType=Hidden +label=API HTTP Method +usage=HTTP Method for the tool call HTTP request",
|
|
56
74
|
)
|
|
57
|
-
method: Method = Field(default=..., description="+sort=50 +uiType=Hidden")
|
|
58
75
|
headers: Optional[Dict[str, StrictStr]] = Field(
|
|
59
76
|
default=None,
|
|
60
|
-
description='+sort=60 +uiType=KV +uiProps={"allowSecrets":true,"secretConfig":{"enableNew":true,"hideOptions":true}}',
|
|
77
|
+
description='+sort=60 +uiType=KV +uiProps={"allowSecrets":true,"secretConfig":{"enableNew":true,"hideOptions":true}} +label=Headers +usage=HTTP Headers for the tool call HTTP request. E.g. `Authorization: Bearer <token>` +uiProps={"descriptionInline":true}',
|
|
61
78
|
)
|
|
62
79
|
__properties = [
|
|
80
|
+
"name",
|
|
63
81
|
"description",
|
|
64
82
|
"metadata",
|
|
65
83
|
"version_alias",
|
|
66
|
-
"name",
|
|
67
84
|
"ml_repo",
|
|
85
|
+
"version",
|
|
68
86
|
"type",
|
|
69
87
|
"openapi_spec",
|
|
70
88
|
"base_url",
|
|
@@ -73,27 +91,27 @@ class AgentOpenAPITool(BaseModel):
|
|
|
73
91
|
"headers",
|
|
74
92
|
]
|
|
75
93
|
|
|
76
|
-
@validator("
|
|
77
|
-
def
|
|
94
|
+
@validator("name")
|
|
95
|
+
def name_validate_regular_expression(cls, value):
|
|
78
96
|
"""Validates the regular expression"""
|
|
79
97
|
if value is None:
|
|
80
98
|
return value
|
|
81
99
|
|
|
82
|
-
if not re.match(r"^
|
|
100
|
+
if not re.match(r"^[A-Za-z0-9_\-]+$", value):
|
|
83
101
|
raise ValueError(
|
|
84
|
-
r"must validate the regular expression /^
|
|
102
|
+
r"must validate the regular expression /^[A-Za-z0-9_\-]+$/"
|
|
85
103
|
)
|
|
86
104
|
return value
|
|
87
105
|
|
|
88
|
-
@validator("
|
|
89
|
-
def
|
|
106
|
+
@validator("version_alias")
|
|
107
|
+
def version_alias_validate_regular_expression(cls, value):
|
|
90
108
|
"""Validates the regular expression"""
|
|
91
109
|
if value is None:
|
|
92
110
|
return value
|
|
93
111
|
|
|
94
|
-
if not re.match(r"^[
|
|
112
|
+
if not re.match(r"^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$", value):
|
|
95
113
|
raise ValueError(
|
|
96
|
-
r"must validate the regular expression /^[
|
|
114
|
+
r"must validate the regular expression /^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$/"
|
|
97
115
|
)
|
|
98
116
|
return value
|
|
99
117
|
|
|
@@ -146,8 +164,8 @@ class AgentOpenAPITool(BaseModel):
|
|
|
146
164
|
return json.dumps(self.to_dict())
|
|
147
165
|
|
|
148
166
|
@classmethod
|
|
149
|
-
def from_json(cls, json_str: str) ->
|
|
150
|
-
"""Create an instance of
|
|
167
|
+
def from_json(cls, json_str: str) -> AgentOpenAPIToolManifest:
|
|
168
|
+
"""Create an instance of AgentOpenAPIToolManifest from a JSON string"""
|
|
151
169
|
return cls.from_dict(json.loads(json_str))
|
|
152
170
|
|
|
153
171
|
def to_dict(self):
|
|
@@ -159,21 +177,22 @@ class AgentOpenAPITool(BaseModel):
|
|
|
159
177
|
return _dict
|
|
160
178
|
|
|
161
179
|
@classmethod
|
|
162
|
-
def from_dict(cls, obj: dict) ->
|
|
163
|
-
"""Create an instance of
|
|
180
|
+
def from_dict(cls, obj: dict) -> AgentOpenAPIToolManifest:
|
|
181
|
+
"""Create an instance of AgentOpenAPIToolManifest from a dict"""
|
|
164
182
|
if obj is None:
|
|
165
183
|
return None
|
|
166
184
|
|
|
167
185
|
if not isinstance(obj, dict):
|
|
168
|
-
return
|
|
186
|
+
return AgentOpenAPIToolManifest.parse_obj(obj)
|
|
169
187
|
|
|
170
|
-
_obj =
|
|
188
|
+
_obj = AgentOpenAPIToolManifest.parse_obj(
|
|
171
189
|
{
|
|
190
|
+
"name": obj.get("name"),
|
|
172
191
|
"description": obj.get("description"),
|
|
173
192
|
"metadata": obj.get("metadata"),
|
|
174
193
|
"version_alias": obj.get("version_alias"),
|
|
175
|
-
"name": obj.get("name"),
|
|
176
194
|
"ml_repo": obj.get("ml_repo"),
|
|
195
|
+
"version": obj.get("version"),
|
|
177
196
|
"type": obj.get("type")
|
|
178
197
|
if obj.get("type") is not None
|
|
179
198
|
else "openapi-tool",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
TrueFoundry ML API
|
|
5
5
|
|
|
6
6
|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -20,7 +20,14 @@ from typing import Any, Dict, Optional
|
|
|
20
20
|
|
|
21
21
|
from truefoundry.ml.autogen.client.models.method import Method
|
|
22
22
|
from truefoundry.ml.autogen.client.models.openapi_spec import OpenapiSpec
|
|
23
|
-
from truefoundry.pydantic_v1 import
|
|
23
|
+
from truefoundry.pydantic_v1 import (
|
|
24
|
+
BaseModel,
|
|
25
|
+
Field,
|
|
26
|
+
StrictStr,
|
|
27
|
+
conint,
|
|
28
|
+
constr,
|
|
29
|
+
validator,
|
|
30
|
+
)
|
|
24
31
|
|
|
25
32
|
|
|
26
33
|
class AgentOpenAPIToolWithFQN(BaseModel):
|
|
@@ -28,45 +35,58 @@ class AgentOpenAPIToolWithFQN(BaseModel):
|
|
|
28
35
|
AgentOpenAPIToolWithFQN
|
|
29
36
|
"""
|
|
30
37
|
|
|
38
|
+
name: Optional[constr(strict=True, max_length=256)] = Field(
|
|
39
|
+
default=None,
|
|
40
|
+
description="+sort=1 +label=Name +message=The name should start with lowercase alphabets and can contain alphanumeric and can include '-' in between +usage=Name of the entity",
|
|
41
|
+
)
|
|
31
42
|
description: Optional[constr(strict=True, max_length=512)] = Field(
|
|
32
43
|
default=None, description="+sort=2 +label=Description"
|
|
33
44
|
)
|
|
34
45
|
metadata: Dict[str, Any] = Field(
|
|
35
46
|
default=...,
|
|
36
|
-
description=
|
|
47
|
+
description='+label=Metadata +usage=Key value metadata. Should be valid JSON. For e.g. `{"business-unit": "sales", "quality": "good", "rating": 4.5}` +uiType=JsonInput +uiProps={"descriptionInline":true}',
|
|
37
48
|
)
|
|
38
49
|
version_alias: Optional[constr(strict=True, max_length=128)] = Field(
|
|
39
50
|
default=None,
|
|
40
|
-
description=
|
|
51
|
+
description='+label=Version Alias +usage=Version alias is alternate, ideally human readable, version string to reference an artifact version. It should start with `v` followed by alphanumeric and it can include `.` and `-` in between (e.g. `v1.0.0`, `v1-prod`, `v3-dev`, etc) +message=The version alias should start with `v` followed by alphanumeric and can include `.` and `-` in between (e.g. `v1.0.0`, `v1-prod`, `v3-dev`, etc) +uiProps={"descriptionInline":true} +placeholder=v1.0.0',
|
|
41
52
|
)
|
|
42
|
-
|
|
53
|
+
ml_repo: Optional[constr(strict=True)] = Field(
|
|
43
54
|
default=None,
|
|
44
|
-
description="+
|
|
55
|
+
description="+label=ML Repo +usage=Name of the ML Repo +uiType=Hidden",
|
|
45
56
|
)
|
|
46
|
-
|
|
57
|
+
version: Optional[conint(strict=True, ge=1)] = Field(
|
|
47
58
|
default=None,
|
|
48
|
-
description="+label=
|
|
59
|
+
description="+label=Version of the entity +usage=Version of the entity +uiType=Hidden",
|
|
60
|
+
)
|
|
61
|
+
type: StrictStr = Field(
|
|
62
|
+
default=..., description="+value=openapi-tool +usage=Type of the agent"
|
|
49
63
|
)
|
|
50
|
-
type: StrictStr = Field(default=..., description="+value=openapi-tool")
|
|
51
64
|
openapi_spec: OpenapiSpec = Field(...)
|
|
52
|
-
base_url: constr(strict=True) = Field(
|
|
65
|
+
base_url: constr(strict=True) = Field(
|
|
66
|
+
default=...,
|
|
67
|
+
description='+sort=30 +label=Base URL +usage=HTTP endpoint where the API is hosted for the tools. E.g. `https://api.example.com/v1` +uiProps={"descriptionInline":true} +placeholder=https://api.example.com/v1',
|
|
68
|
+
)
|
|
53
69
|
path: constr(strict=True, min_length=1) = Field(
|
|
54
70
|
default=...,
|
|
55
|
-
description=
|
|
71
|
+
description='+sort=40 +uiType=MethodPathSelector +label=API Route Path +usage=API Route Path for the tool call HTTP request. E.g. `GET /weather` +uiProps={"descriptionInline":true}',
|
|
72
|
+
)
|
|
73
|
+
method: Method = Field(
|
|
74
|
+
default=...,
|
|
75
|
+
description="+sort=50 +uiType=Hidden +label=API HTTP Method +usage=HTTP Method for the tool call HTTP request",
|
|
56
76
|
)
|
|
57
|
-
method: Method = Field(default=..., description="+sort=50 +uiType=Hidden")
|
|
58
77
|
headers: Optional[Dict[str, StrictStr]] = Field(
|
|
59
78
|
default=None,
|
|
60
|
-
description='+sort=60 +uiType=KV +uiProps={"allowSecrets":true,"secretConfig":{"enableNew":true,"hideOptions":true}}',
|
|
79
|
+
description='+sort=60 +uiType=KV +uiProps={"allowSecrets":true,"secretConfig":{"enableNew":true,"hideOptions":true}} +label=Headers +usage=HTTP Headers for the tool call HTTP request. E.g. `Authorization: Bearer <token>` +uiProps={"descriptionInline":true}',
|
|
61
80
|
)
|
|
62
|
-
id: StrictStr = Field(
|
|
63
|
-
fqn: StrictStr = Field(
|
|
81
|
+
id: StrictStr = Field(default=..., description="+usage=ID of the agent tool")
|
|
82
|
+
fqn: StrictStr = Field(default=..., description="+usage=FQN of the agent tool")
|
|
64
83
|
__properties = [
|
|
84
|
+
"name",
|
|
65
85
|
"description",
|
|
66
86
|
"metadata",
|
|
67
87
|
"version_alias",
|
|
68
|
-
"name",
|
|
69
88
|
"ml_repo",
|
|
89
|
+
"version",
|
|
70
90
|
"type",
|
|
71
91
|
"openapi_spec",
|
|
72
92
|
"base_url",
|
|
@@ -77,27 +97,27 @@ class AgentOpenAPIToolWithFQN(BaseModel):
|
|
|
77
97
|
"fqn",
|
|
78
98
|
]
|
|
79
99
|
|
|
80
|
-
@validator("
|
|
81
|
-
def
|
|
100
|
+
@validator("name")
|
|
101
|
+
def name_validate_regular_expression(cls, value):
|
|
82
102
|
"""Validates the regular expression"""
|
|
83
103
|
if value is None:
|
|
84
104
|
return value
|
|
85
105
|
|
|
86
|
-
if not re.match(r"^
|
|
106
|
+
if not re.match(r"^[A-Za-z0-9_\-]+$", value):
|
|
87
107
|
raise ValueError(
|
|
88
|
-
r"must validate the regular expression /^
|
|
108
|
+
r"must validate the regular expression /^[A-Za-z0-9_\-]+$/"
|
|
89
109
|
)
|
|
90
110
|
return value
|
|
91
111
|
|
|
92
|
-
@validator("
|
|
93
|
-
def
|
|
112
|
+
@validator("version_alias")
|
|
113
|
+
def version_alias_validate_regular_expression(cls, value):
|
|
94
114
|
"""Validates the regular expression"""
|
|
95
115
|
if value is None:
|
|
96
116
|
return value
|
|
97
117
|
|
|
98
|
-
if not re.match(r"^[
|
|
118
|
+
if not re.match(r"^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$", value):
|
|
99
119
|
raise ValueError(
|
|
100
|
-
r"must validate the regular expression /^[
|
|
120
|
+
r"must validate the regular expression /^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$/"
|
|
101
121
|
)
|
|
102
122
|
return value
|
|
103
123
|
|
|
@@ -170,11 +190,12 @@ class AgentOpenAPIToolWithFQN(BaseModel):
|
|
|
170
190
|
|
|
171
191
|
_obj = AgentOpenAPIToolWithFQN.parse_obj(
|
|
172
192
|
{
|
|
193
|
+
"name": obj.get("name"),
|
|
173
194
|
"description": obj.get("description"),
|
|
174
195
|
"metadata": obj.get("metadata"),
|
|
175
196
|
"version_alias": obj.get("version_alias"),
|
|
176
|
-
"name": obj.get("name"),
|
|
177
197
|
"ml_repo": obj.get("ml_repo"),
|
|
198
|
+
"version": obj.get("version"),
|
|
178
199
|
"type": obj.get("type"),
|
|
179
200
|
"openapi_spec": OpenapiSpec.from_dict(obj.get("openapi_spec"))
|
|
180
201
|
if obj.get("openapi_spec") is not None
|