eval-studio-client 1.1.0a5__py3-none-any.whl → 1.1.0a7__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.
- eval_studio_client/api/__init__.py +7 -3
- eval_studio_client/api/api/__init__.py +0 -1
- eval_studio_client/api/api/dashboard_service_api.py +17 -0
- eval_studio_client/api/api/test_service_api.py +34 -0
- eval_studio_client/api/api/workflow_service_api.py +510 -0
- eval_studio_client/api/docs/DashboardServiceApi.md +4 -2
- eval_studio_client/api/docs/PromptGenerationServiceAutoGeneratePromptsRequest.md +1 -1
- eval_studio_client/api/docs/RequiredTheDashboardToUpdate.md +1 -0
- eval_studio_client/api/docs/RequiredTheTestToUpdate.md +1 -0
- eval_studio_client/api/docs/TestServiceApi.md +8 -4
- eval_studio_client/api/docs/TestServiceGenerateTestCasesRequest.md +1 -1
- eval_studio_client/api/docs/V1Context.md +9 -4
- eval_studio_client/api/docs/V1Dashboard.md +1 -0
- eval_studio_client/api/docs/V1DashboardType.md +12 -0
- eval_studio_client/api/docs/V1DependencyList.md +30 -0
- eval_studio_client/api/docs/V1Evaluator.md +2 -0
- eval_studio_client/api/docs/V1GetGuardrailsConfigurationResponse.md +29 -0
- eval_studio_client/api/docs/V1LeaderboardReportModel.md +0 -2
- eval_studio_client/api/docs/V1ListWorkflowDependenciesResponse.md +30 -0
- eval_studio_client/api/docs/V1RepeatedContext.md +29 -0
- eval_studio_client/api/docs/V1Test.md +1 -0
- eval_studio_client/api/docs/V1TestType.md +12 -0
- eval_studio_client/api/docs/V1WorkflowDependency.md +30 -0
- eval_studio_client/api/docs/V1WorkflowEdgeType.md +1 -1
- eval_studio_client/api/docs/V1WorkflowNodeArtifact.md +1 -0
- eval_studio_client/api/docs/WorkflowServiceApi.md +135 -0
- eval_studio_client/api/models/__init__.py +7 -2
- eval_studio_client/api/models/prompt_generation_service_auto_generate_prompts_request.py +3 -2
- eval_studio_client/api/models/required_the_dashboard_to_update.py +5 -2
- eval_studio_client/api/models/required_the_test_to_update.py +5 -2
- eval_studio_client/api/models/test_service_generate_test_cases_request.py +10 -2
- eval_studio_client/api/models/v1_context.py +16 -6
- eval_studio_client/api/models/v1_dashboard.py +5 -2
- eval_studio_client/api/models/v1_dashboard_type.py +38 -0
- eval_studio_client/api/models/{generated_questions_validation_service_validate_generated_questions_request.py → v1_dependency_list.py} +14 -14
- eval_studio_client/api/models/v1_evaluator.py +11 -3
- eval_studio_client/api/models/v1_get_guardrails_configuration_response.py +87 -0
- eval_studio_client/api/models/v1_leaderboard_report_model.py +2 -10
- eval_studio_client/api/models/v1_list_workflow_dependencies_response.py +105 -0
- eval_studio_client/api/models/{v1_generated_test_case.py → v1_repeated_context.py} +12 -18
- eval_studio_client/api/models/v1_test.py +5 -2
- eval_studio_client/api/models/v1_test_type.py +38 -0
- eval_studio_client/api/models/v1_workflow_dependency.py +89 -0
- eval_studio_client/api/models/v1_workflow_edge_type.py +3 -2
- eval_studio_client/api/models/v1_workflow_node_artifact.py +6 -2
- eval_studio_client/api/test/test_prompt_generation_service_auto_generate_prompts_request.py +10 -2
- eval_studio_client/api/test/test_required_the_dashboard_to_update.py +2 -1
- eval_studio_client/api/test/test_required_the_test_to_update.py +2 -1
- eval_studio_client/api/test/test_required_the_updated_workflow.py +2 -1
- eval_studio_client/api/test/test_required_the_updated_workflow_node.py +2 -1
- eval_studio_client/api/test/test_test_service_generate_test_cases_request.py +10 -1
- eval_studio_client/api/test/test_v1_batch_delete_dashboards_response.py +2 -1
- eval_studio_client/api/test/test_v1_batch_delete_evaluators_response.py +3 -1
- eval_studio_client/api/test/test_v1_batch_delete_tests_response.py +2 -1
- eval_studio_client/api/test/test_v1_batch_get_dashboards_response.py +2 -1
- eval_studio_client/api/test/test_v1_batch_get_tests_response.py +2 -1
- eval_studio_client/api/test/test_v1_batch_import_tests_response.py +2 -1
- eval_studio_client/api/test/test_v1_clone_test_response.py +2 -1
- eval_studio_client/api/test/test_v1_context.py +6 -1
- eval_studio_client/api/test/test_v1_create_dashboard_response.py +2 -1
- eval_studio_client/api/test/test_v1_create_evaluator_response.py +3 -1
- eval_studio_client/api/test/test_v1_create_test_response.py +2 -1
- eval_studio_client/api/test/test_v1_dashboard.py +2 -1
- eval_studio_client/api/test/test_v1_dashboard_type.py +33 -0
- eval_studio_client/api/test/test_v1_delete_dashboard_response.py +2 -1
- eval_studio_client/api/test/test_v1_delete_evaluator_response.py +3 -1
- eval_studio_client/api/test/test_v1_delete_test_response.py +2 -1
- eval_studio_client/api/test/test_v1_dependency_list.py +56 -0
- eval_studio_client/api/test/test_v1_evaluator.py +3 -1
- eval_studio_client/api/test/test_v1_get_dashboard_response.py +2 -1
- eval_studio_client/api/test/test_v1_get_evaluator_response.py +3 -1
- eval_studio_client/api/test/test_v1_get_guardrails_configuration_response.py +51 -0
- eval_studio_client/api/test/test_v1_get_leaderboard_report_response.py +1 -3
- eval_studio_client/api/test/test_v1_get_test_response.py +2 -1
- eval_studio_client/api/test/test_v1_leaderboard_report.py +1 -3
- eval_studio_client/api/test/test_v1_leaderboard_report_model.py +1 -3
- eval_studio_client/api/test/test_v1_list_dashboards_response.py +2 -1
- eval_studio_client/api/test/test_v1_list_evaluators_response.py +3 -1
- eval_studio_client/api/test/test_v1_list_most_recent_dashboards_response.py +2 -1
- eval_studio_client/api/test/test_v1_list_most_recent_tests_response.py +2 -1
- eval_studio_client/api/test/test_v1_list_tests_response.py +2 -1
- eval_studio_client/api/test/test_v1_list_workflow_dependencies_response.py +93 -0
- eval_studio_client/api/test/test_v1_perturb_test_in_place_response.py +2 -1
- eval_studio_client/api/test/test_v1_perturb_test_response.py +2 -1
- eval_studio_client/api/test/test_v1_repeated_context.py +62 -0
- eval_studio_client/api/test/test_v1_test.py +2 -1
- eval_studio_client/api/test/test_v1_test_type.py +33 -0
- eval_studio_client/api/test/test_v1_update_dashboard_response.py +2 -1
- eval_studio_client/api/test/test_v1_update_test_response.py +2 -1
- eval_studio_client/api/test/test_v1_workflow.py +2 -1
- eval_studio_client/api/test/test_v1_workflow_dependency.py +52 -0
- eval_studio_client/api/test/test_v1_workflow_node.py +2 -1
- eval_studio_client/api/test/test_v1_workflow_node_artifact.py +2 -1
- eval_studio_client/api/test/test_v1_workflow_node_artifacts.py +2 -1
- eval_studio_client/api/test/test_workflow_service_api.py +13 -0
- eval_studio_client/client.py +11 -2
- eval_studio_client/gen/openapiv2/eval_studio.swagger.json +241 -92
- {eval_studio_client-1.1.0a5.dist-info → eval_studio_client-1.1.0a7.dist-info}/METADATA +1 -1
- {eval_studio_client-1.1.0a5.dist-info → eval_studio_client-1.1.0a7.dist-info}/RECORD +100 -88
- eval_studio_client/api/api/generated_questions_validation_service_api.py +0 -321
- eval_studio_client/api/docs/GeneratedQuestionsValidationServiceApi.md +0 -78
- eval_studio_client/api/docs/GeneratedQuestionsValidationServiceValidateGeneratedQuestionsRequest.md +0 -30
- eval_studio_client/api/docs/V1GeneratedTestCase.md +0 -30
- eval_studio_client/api/test/test_generated_questions_validation_service_api.py +0 -37
- eval_studio_client/api/test/test_generated_questions_validation_service_validate_generated_questions_request.py +0 -83
- eval_studio_client/api/test/test_v1_generated_test_case.py +0 -79
- {eval_studio_client-1.1.0a5.dist-info → eval_studio_client-1.1.0a7.dist-info}/WHEEL +0 -0
|
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
|
|
|
18
18
|
**leaderboards** | **List[str]** | Immutable. Resource names of the Leaderboards used in this Dashboard. | [optional]
|
|
19
19
|
**create_operation** | **str** | Output only. Operation resource name that created this Dashboard. | [optional] [readonly]
|
|
20
20
|
**demo** | **bool** | Output only. Whether the Dashboard is a demo resource or not. Demo resources are read only. | [optional] [readonly]
|
|
21
|
+
**type** | [**V1DashboardType**](V1DashboardType.md) | | [optional]
|
|
21
22
|
|
|
22
23
|
## Example
|
|
23
24
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# V1DashboardType
|
|
2
|
+
|
|
3
|
+
- DASHBOARD_TYPE_UNSPECIFIED: Unspecified type. - DASHBOARD_TYPE_STANDALONE: Standalone dashboard. - DASHBOARD_TYPE_WORKFLOW: Dashboard is part of a dashboard group.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
|
|
10
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
11
|
+
|
|
12
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# V1DependencyList
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**node** | **str** | The name of the Workflow Node to retrieve dependencies for. | [optional]
|
|
9
|
+
**dependencies** | [**List[V1WorkflowDependency]**](V1WorkflowDependency.md) | The names of the Workflow Node dependencies. | [optional]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from eval_studio_client.api.models.v1_dependency_list import V1DependencyList
|
|
15
|
+
|
|
16
|
+
# TODO update the JSON string below
|
|
17
|
+
json = "{}"
|
|
18
|
+
# create an instance of V1DependencyList from a JSON string
|
|
19
|
+
v1_dependency_list_instance = V1DependencyList.from_json(json)
|
|
20
|
+
# print the JSON string representation of the object
|
|
21
|
+
print(V1DependencyList.to_json())
|
|
22
|
+
|
|
23
|
+
# convert the object into a dict
|
|
24
|
+
v1_dependency_list_dict = v1_dependency_list_instance.to_dict()
|
|
25
|
+
# create an instance of V1DependencyList from a dict
|
|
26
|
+
v1_dependency_list_from_dict = V1DependencyList.from_dict(v1_dependency_list_dict)
|
|
27
|
+
```
|
|
28
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
29
|
+
|
|
30
|
+
|
|
@@ -23,6 +23,8 @@ Name | Type | Description | Notes
|
|
|
23
23
|
**brief_description** | **str** | Optional. Short preview of the Evaluator's description. | [optional]
|
|
24
24
|
**enabled** | **bool** | Output only. Whether this Evaluator can be used for creating evaluations. Evaluator might be disabled because it has some external requirements that are not met. | [optional] [readonly]
|
|
25
25
|
**tagline** | **str** | Output only. Tagline is a short (single-line) and high-level description of the evaluator. | [optional] [readonly]
|
|
26
|
+
**primary_metric** | **str** | Output only. Optional. The name of the primary metric. | [optional] [readonly]
|
|
27
|
+
**primary_metric_default_threshold** | **float** | Output only. Optional. Default threshold of the primary metric. Value must be ignored if primary_metric is invalid. | [optional] [readonly]
|
|
26
28
|
|
|
27
29
|
## Example
|
|
28
30
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# V1GetGuardrailsConfigurationResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**guardrails_configuration_json** | **str** | The guardrails configuration for the Workflow requested in JSON format. This configuration is usable by the guardrails client as is. | [optional]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```python
|
|
13
|
+
from eval_studio_client.api.models.v1_get_guardrails_configuration_response import V1GetGuardrailsConfigurationResponse
|
|
14
|
+
|
|
15
|
+
# TODO update the JSON string below
|
|
16
|
+
json = "{}"
|
|
17
|
+
# create an instance of V1GetGuardrailsConfigurationResponse from a JSON string
|
|
18
|
+
v1_get_guardrails_configuration_response_instance = V1GetGuardrailsConfigurationResponse.from_json(json)
|
|
19
|
+
# print the JSON string representation of the object
|
|
20
|
+
print(V1GetGuardrailsConfigurationResponse.to_json())
|
|
21
|
+
|
|
22
|
+
# convert the object into a dict
|
|
23
|
+
v1_get_guardrails_configuration_response_dict = v1_get_guardrails_configuration_response_instance.to_dict()
|
|
24
|
+
# create an instance of V1GetGuardrailsConfigurationResponse from a dict
|
|
25
|
+
v1_get_guardrails_configuration_response_from_dict = V1GetGuardrailsConfigurationResponse.from_dict(v1_get_guardrails_configuration_response_dict)
|
|
26
|
+
```
|
|
27
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
28
|
+
|
|
29
|
+
|
|
@@ -13,9 +13,7 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**collection_name** | **str** | Optional. Collection name. | [optional]
|
|
14
14
|
**llm_model_name** | **str** | Output only. LLM model name. | [optional] [readonly]
|
|
15
15
|
**documents** | **List[str]** | Output only. List of documents. | [optional] [readonly]
|
|
16
|
-
**model_cfg** | **object** | Output only. Model configuration. | [optional] [readonly]
|
|
17
16
|
**key** | **str** | Output only. Model key. | [optional] [readonly]
|
|
18
|
-
**llm_model_meta** | **object** | Output only. LLM model metadata - recursive dictionaries with an additional info like performance stats. | [optional] [readonly]
|
|
19
17
|
|
|
20
18
|
## Example
|
|
21
19
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# V1ListWorkflowDependenciesResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**nodes** | [**List[V1WorkflowNode]**](V1WorkflowNode.md) | The list of the WorkflowNodes related to requested workflow. | [optional]
|
|
9
|
+
**dependencies** | [**List[V1DependencyList]**](V1DependencyList.md) | The dependency map for the workflow. | [optional]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from eval_studio_client.api.models.v1_list_workflow_dependencies_response import V1ListWorkflowDependenciesResponse
|
|
15
|
+
|
|
16
|
+
# TODO update the JSON string below
|
|
17
|
+
json = "{}"
|
|
18
|
+
# create an instance of V1ListWorkflowDependenciesResponse from a JSON string
|
|
19
|
+
v1_list_workflow_dependencies_response_instance = V1ListWorkflowDependenciesResponse.from_json(json)
|
|
20
|
+
# print the JSON string representation of the object
|
|
21
|
+
print(V1ListWorkflowDependenciesResponse.to_json())
|
|
22
|
+
|
|
23
|
+
# convert the object into a dict
|
|
24
|
+
v1_list_workflow_dependencies_response_dict = v1_list_workflow_dependencies_response_instance.to_dict()
|
|
25
|
+
# create an instance of V1ListWorkflowDependenciesResponse from a dict
|
|
26
|
+
v1_list_workflow_dependencies_response_from_dict = V1ListWorkflowDependenciesResponse.from_dict(v1_list_workflow_dependencies_response_dict)
|
|
27
|
+
```
|
|
28
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# V1RepeatedContext
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**content** | [**List[V1Context]**](V1Context.md) | | [optional]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```python
|
|
13
|
+
from eval_studio_client.api.models.v1_repeated_context import V1RepeatedContext
|
|
14
|
+
|
|
15
|
+
# TODO update the JSON string below
|
|
16
|
+
json = "{}"
|
|
17
|
+
# create an instance of V1RepeatedContext from a JSON string
|
|
18
|
+
v1_repeated_context_instance = V1RepeatedContext.from_json(json)
|
|
19
|
+
# print the JSON string representation of the object
|
|
20
|
+
print(V1RepeatedContext.to_json())
|
|
21
|
+
|
|
22
|
+
# convert the object into a dict
|
|
23
|
+
v1_repeated_context_dict = v1_repeated_context_instance.to_dict()
|
|
24
|
+
# create an instance of V1RepeatedContext from a dict
|
|
25
|
+
v1_repeated_context_from_dict = V1RepeatedContext.from_dict(v1_repeated_context_dict)
|
|
26
|
+
```
|
|
27
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
28
|
+
|
|
29
|
+
|
|
@@ -17,6 +17,7 @@ Name | Type | Description | Notes
|
|
|
17
17
|
**documents** | **List[str]** | Immutable. Resource names of Documents assigned to the Test. | [optional]
|
|
18
18
|
**tags** | **List[str]** | Tags assigned to the Test. | [optional]
|
|
19
19
|
**demo** | **bool** | Output only. Whether the Test is a demo resource or not. Demo resources are read only. | [optional] [readonly]
|
|
20
|
+
**type** | [**V1TestType**](V1TestType.md) | | [optional]
|
|
20
21
|
|
|
21
22
|
## Example
|
|
22
23
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# V1TestType
|
|
2
|
+
|
|
3
|
+
- TEST_TYPE_UNSPECIFIED: Unspecified type. - TEST_TYPE_STANDALONE: Standalone test. - TEST_TYPE_WORKFLOW: Test is part of a dashboard.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
|
|
10
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
11
|
+
|
|
12
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# V1WorkflowDependency
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**name** | **str** | Required. The name of the Workflow Dependency node. | [optional]
|
|
9
|
+
**optional** | **bool** | Optional. Whether the dependency is optional. | [optional]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from eval_studio_client.api.models.v1_workflow_dependency import V1WorkflowDependency
|
|
15
|
+
|
|
16
|
+
# TODO update the JSON string below
|
|
17
|
+
json = "{}"
|
|
18
|
+
# create an instance of V1WorkflowDependency from a JSON string
|
|
19
|
+
v1_workflow_dependency_instance = V1WorkflowDependency.from_json(json)
|
|
20
|
+
# print the JSON string representation of the object
|
|
21
|
+
print(V1WorkflowDependency.to_json())
|
|
22
|
+
|
|
23
|
+
# convert the object into a dict
|
|
24
|
+
v1_workflow_dependency_dict = v1_workflow_dependency_instance.to_dict()
|
|
25
|
+
# create an instance of V1WorkflowDependency from a dict
|
|
26
|
+
v1_workflow_dependency_from_dict = V1WorkflowDependency.from_dict(v1_workflow_dependency_dict)
|
|
27
|
+
```
|
|
28
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
29
|
+
|
|
30
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# V1WorkflowEdgeType
|
|
2
2
|
|
|
3
|
-
WorkflowEdgeType represents the type of a WorkflowEdge. - WORKFLOW_EDGE_TYPE_UNSPECIFIED: Unspecified type. -
|
|
3
|
+
WorkflowEdgeType represents the type of a WorkflowEdge. - WORKFLOW_EDGE_TYPE_UNSPECIFIED: Unspecified type. - WORKFLOW_EDGE_TYPE_DEPENDENCY: A required dependency type of edge. This edge type defines that the \"to\" node depends on the outputs of the \"from\" node. - WORKFLOW_EDGE_TYPE_OPTIONAL_DEPENDENCY: Optional dependency edge, which indicates that the outputs of the \"from\" node can be used in case they exist, but the \"to\" node does not rely on them.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
@@ -17,6 +17,7 @@ Name | Type | Description | Notes
|
|
|
17
17
|
**delete_time** | **datetime** | Output only. Optional. Deletion time of the WorkflowNodeArtifact. | [optional] [readonly]
|
|
18
18
|
**deleter** | **str** | Output only. Name of the user or service that requested deletion of the WorkflowNodeArtifact. | [optional] [readonly]
|
|
19
19
|
**mime_type** | **str** | Optional MIME type of the WorkflowNodeArtifact. | [optional]
|
|
20
|
+
**type** | **str** | Output only. Immutable. Type of the WorkflowNodeArtifact. | [optional] [readonly]
|
|
20
21
|
|
|
21
22
|
## Example
|
|
22
23
|
|
|
@@ -8,7 +8,9 @@ Method | HTTP request | Description
|
|
|
8
8
|
[**workflow_service_clone_workflow**](WorkflowServiceApi.md#workflow_service_clone_workflow) | **POST** /v1/{name_1}:clone | CloneWorkflow clones an existing Workflow.
|
|
9
9
|
[**workflow_service_create_workflow**](WorkflowServiceApi.md#workflow_service_create_workflow) | **POST** /v1/workflows | CreateWorkflow creates a Workflow.
|
|
10
10
|
[**workflow_service_delete_workflow**](WorkflowServiceApi.md#workflow_service_delete_workflow) | **DELETE** /v1/{name_9} | DeleteWorkflow deletes a Workflow by name. If the Workflow does not exist an error is returned.
|
|
11
|
+
[**workflow_service_get_guardrails_configuration**](WorkflowServiceApi.md#workflow_service_get_guardrails_configuration) | **GET** /v1/{name}:getGuardrailsConfiguration |
|
|
11
12
|
[**workflow_service_get_workflow**](WorkflowServiceApi.md#workflow_service_get_workflow) | **GET** /v1/{name_12} | GetWorkflow retrieves a Workflow by name. Deleted Workflow is returned without error, it has a delete_time and deleter fields set.
|
|
13
|
+
[**workflow_service_list_workflow_dependencies**](WorkflowServiceApi.md#workflow_service_list_workflow_dependencies) | **GET** /v1/{name}:nodeDependencies | ListWorkflowDependencies lists workflow nodes and map of the node dependencies.
|
|
12
14
|
[**workflow_service_list_workflows**](WorkflowServiceApi.md#workflow_service_list_workflows) | **GET** /v1/workflows | ListWorkflows lists Workflows.
|
|
13
15
|
[**workflow_service_update_workflow**](WorkflowServiceApi.md#workflow_service_update_workflow) | **PATCH** /v1/{workflow.name} | UpdateWorkflow updates a Workflow. The update_mask is used to specify the fields to be updated.
|
|
14
16
|
|
|
@@ -286,6 +288,72 @@ No authorization required
|
|
|
286
288
|
|
|
287
289
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
288
290
|
|
|
291
|
+
# **workflow_service_get_guardrails_configuration**
|
|
292
|
+
> V1GetGuardrailsConfigurationResponse workflow_service_get_guardrails_configuration(name)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
### Example
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
```python
|
|
300
|
+
import eval_studio_client.api
|
|
301
|
+
from eval_studio_client.api.models.v1_get_guardrails_configuration_response import V1GetGuardrailsConfigurationResponse
|
|
302
|
+
from eval_studio_client.api.rest import ApiException
|
|
303
|
+
from pprint import pprint
|
|
304
|
+
|
|
305
|
+
# Defining the host is optional and defaults to http://localhost
|
|
306
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
307
|
+
configuration = eval_studio_client.api.Configuration(
|
|
308
|
+
host = "http://localhost"
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
# Enter a context with an instance of the API client
|
|
313
|
+
with eval_studio_client.api.ApiClient(configuration) as api_client:
|
|
314
|
+
# Create an instance of the API class
|
|
315
|
+
api_instance = eval_studio_client.api.WorkflowServiceApi(api_client)
|
|
316
|
+
name = 'name_example' # str | Required. The name of the Workflow to retrieve guardrails configuration for. The Human Calibration node must be completed, otherwise an error is returned.
|
|
317
|
+
|
|
318
|
+
try:
|
|
319
|
+
api_response = api_instance.workflow_service_get_guardrails_configuration(name)
|
|
320
|
+
print("The response of WorkflowServiceApi->workflow_service_get_guardrails_configuration:\n")
|
|
321
|
+
pprint(api_response)
|
|
322
|
+
except Exception as e:
|
|
323
|
+
print("Exception when calling WorkflowServiceApi->workflow_service_get_guardrails_configuration: %s\n" % e)
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
### Parameters
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
Name | Type | Description | Notes
|
|
332
|
+
------------- | ------------- | ------------- | -------------
|
|
333
|
+
**name** | **str**| Required. The name of the Workflow to retrieve guardrails configuration for. The Human Calibration node must be completed, otherwise an error is returned. |
|
|
334
|
+
|
|
335
|
+
### Return type
|
|
336
|
+
|
|
337
|
+
[**V1GetGuardrailsConfigurationResponse**](V1GetGuardrailsConfigurationResponse.md)
|
|
338
|
+
|
|
339
|
+
### Authorization
|
|
340
|
+
|
|
341
|
+
No authorization required
|
|
342
|
+
|
|
343
|
+
### HTTP request headers
|
|
344
|
+
|
|
345
|
+
- **Content-Type**: Not defined
|
|
346
|
+
- **Accept**: application/json
|
|
347
|
+
|
|
348
|
+
### HTTP response details
|
|
349
|
+
|
|
350
|
+
| Status code | Description | Response headers |
|
|
351
|
+
|-------------|-------------|------------------|
|
|
352
|
+
**200** | A successful response. | - |
|
|
353
|
+
**0** | An unexpected error response. | - |
|
|
354
|
+
|
|
355
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
356
|
+
|
|
289
357
|
# **workflow_service_get_workflow**
|
|
290
358
|
> V1GetWorkflowResponse workflow_service_get_workflow(name_12)
|
|
291
359
|
|
|
@@ -353,6 +421,73 @@ No authorization required
|
|
|
353
421
|
|
|
354
422
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
355
423
|
|
|
424
|
+
# **workflow_service_list_workflow_dependencies**
|
|
425
|
+
> V1ListWorkflowDependenciesResponse workflow_service_list_workflow_dependencies(name)
|
|
426
|
+
|
|
427
|
+
ListWorkflowDependencies lists workflow nodes and map of the node dependencies.
|
|
428
|
+
|
|
429
|
+
### Example
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
```python
|
|
433
|
+
import eval_studio_client.api
|
|
434
|
+
from eval_studio_client.api.models.v1_list_workflow_dependencies_response import V1ListWorkflowDependenciesResponse
|
|
435
|
+
from eval_studio_client.api.rest import ApiException
|
|
436
|
+
from pprint import pprint
|
|
437
|
+
|
|
438
|
+
# Defining the host is optional and defaults to http://localhost
|
|
439
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
440
|
+
configuration = eval_studio_client.api.Configuration(
|
|
441
|
+
host = "http://localhost"
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
# Enter a context with an instance of the API client
|
|
446
|
+
with eval_studio_client.api.ApiClient(configuration) as api_client:
|
|
447
|
+
# Create an instance of the API class
|
|
448
|
+
api_instance = eval_studio_client.api.WorkflowServiceApi(api_client)
|
|
449
|
+
name = 'name_example' # str | Required. The name of the Workflow to retrieve dependencies for.
|
|
450
|
+
|
|
451
|
+
try:
|
|
452
|
+
# ListWorkflowDependencies lists workflow nodes and map of the node dependencies.
|
|
453
|
+
api_response = api_instance.workflow_service_list_workflow_dependencies(name)
|
|
454
|
+
print("The response of WorkflowServiceApi->workflow_service_list_workflow_dependencies:\n")
|
|
455
|
+
pprint(api_response)
|
|
456
|
+
except Exception as e:
|
|
457
|
+
print("Exception when calling WorkflowServiceApi->workflow_service_list_workflow_dependencies: %s\n" % e)
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
### Parameters
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
Name | Type | Description | Notes
|
|
466
|
+
------------- | ------------- | ------------- | -------------
|
|
467
|
+
**name** | **str**| Required. The name of the Workflow to retrieve dependencies for. |
|
|
468
|
+
|
|
469
|
+
### Return type
|
|
470
|
+
|
|
471
|
+
[**V1ListWorkflowDependenciesResponse**](V1ListWorkflowDependenciesResponse.md)
|
|
472
|
+
|
|
473
|
+
### Authorization
|
|
474
|
+
|
|
475
|
+
No authorization required
|
|
476
|
+
|
|
477
|
+
### HTTP request headers
|
|
478
|
+
|
|
479
|
+
- **Content-Type**: Not defined
|
|
480
|
+
- **Accept**: application/json
|
|
481
|
+
|
|
482
|
+
### HTTP response details
|
|
483
|
+
|
|
484
|
+
| Status code | Description | Response headers |
|
|
485
|
+
|-------------|-------------|------------------|
|
|
486
|
+
**200** | A successful response. | - |
|
|
487
|
+
**0** | An unexpected error response. | - |
|
|
488
|
+
|
|
489
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
490
|
+
|
|
356
491
|
# **workflow_service_list_workflows**
|
|
357
492
|
> V1ListWorkflowsResponse workflow_service_list_workflows()
|
|
358
493
|
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
|
|
16
16
|
# import models into model package
|
|
17
17
|
from eval_studio_client.api.models.adversarial_inputs_service_test_adversarial_inputs_robustness_request import AdversarialInputsServiceTestAdversarialInputsRobustnessRequest
|
|
18
|
-
from eval_studio_client.api.models.generated_questions_validation_service_validate_generated_questions_request import GeneratedQuestionsValidationServiceValidateGeneratedQuestionsRequest
|
|
19
18
|
from eval_studio_client.api.models.perturbation_service_create_perturbation_request import PerturbationServiceCreatePerturbationRequest
|
|
20
19
|
from eval_studio_client.api.models.prompt_generation_service_auto_generate_prompts_request import PromptGenerationServiceAutoGeneratePromptsRequest
|
|
21
20
|
from eval_studio_client.api.models.protobuf_any import ProtobufAny
|
|
@@ -90,6 +89,7 @@ from eval_studio_client.api.models.v1_create_workflow_node_response import V1Cre
|
|
|
90
89
|
from eval_studio_client.api.models.v1_create_workflow_response import V1CreateWorkflowResponse
|
|
91
90
|
from eval_studio_client.api.models.v1_dashboard import V1Dashboard
|
|
92
91
|
from eval_studio_client.api.models.v1_dashboard_status import V1DashboardStatus
|
|
92
|
+
from eval_studio_client.api.models.v1_dashboard_type import V1DashboardType
|
|
93
93
|
from eval_studio_client.api.models.v1_delete_dashboard_response import V1DeleteDashboardResponse
|
|
94
94
|
from eval_studio_client.api.models.v1_delete_document_response import V1DeleteDocumentResponse
|
|
95
95
|
from eval_studio_client.api.models.v1_delete_evaluator_response import V1DeleteEvaluatorResponse
|
|
@@ -100,6 +100,7 @@ from eval_studio_client.api.models.v1_delete_test_response import V1DeleteTestRe
|
|
|
100
100
|
from eval_studio_client.api.models.v1_delete_workflow_edge_response import V1DeleteWorkflowEdgeResponse
|
|
101
101
|
from eval_studio_client.api.models.v1_delete_workflow_node_response import V1DeleteWorkflowNodeResponse
|
|
102
102
|
from eval_studio_client.api.models.v1_delete_workflow_response import V1DeleteWorkflowResponse
|
|
103
|
+
from eval_studio_client.api.models.v1_dependency_list import V1DependencyList
|
|
103
104
|
from eval_studio_client.api.models.v1_document import V1Document
|
|
104
105
|
from eval_studio_client.api.models.v1_estimate_threshold_request import V1EstimateThresholdRequest
|
|
105
106
|
from eval_studio_client.api.models.v1_evaluation_test import V1EvaluationTest
|
|
@@ -111,10 +112,10 @@ from eval_studio_client.api.models.v1_finalize_operation_response import V1Final
|
|
|
111
112
|
from eval_studio_client.api.models.v1_find_all_test_cases_by_id_response import V1FindAllTestCasesByIDResponse
|
|
112
113
|
from eval_studio_client.api.models.v1_find_test_lab_response import V1FindTestLabResponse
|
|
113
114
|
from eval_studio_client.api.models.v1_generate_test_cases_response import V1GenerateTestCasesResponse
|
|
114
|
-
from eval_studio_client.api.models.v1_generated_test_case import V1GeneratedTestCase
|
|
115
115
|
from eval_studio_client.api.models.v1_get_dashboard_response import V1GetDashboardResponse
|
|
116
116
|
from eval_studio_client.api.models.v1_get_document_response import V1GetDocumentResponse
|
|
117
117
|
from eval_studio_client.api.models.v1_get_evaluator_response import V1GetEvaluatorResponse
|
|
118
|
+
from eval_studio_client.api.models.v1_get_guardrails_configuration_response import V1GetGuardrailsConfigurationResponse
|
|
118
119
|
from eval_studio_client.api.models.v1_get_info_response import V1GetInfoResponse
|
|
119
120
|
from eval_studio_client.api.models.v1_get_leaderboard_report_response import V1GetLeaderboardReportResponse
|
|
120
121
|
from eval_studio_client.api.models.v1_get_leaderboard_response import V1GetLeaderboardResponse
|
|
@@ -172,6 +173,7 @@ from eval_studio_client.api.models.v1_list_test_case_relationships_response impo
|
|
|
172
173
|
from eval_studio_client.api.models.v1_list_test_cases_response import V1ListTestCasesResponse
|
|
173
174
|
from eval_studio_client.api.models.v1_list_test_classes_response import V1ListTestClassesResponse
|
|
174
175
|
from eval_studio_client.api.models.v1_list_tests_response import V1ListTestsResponse
|
|
176
|
+
from eval_studio_client.api.models.v1_list_workflow_dependencies_response import V1ListWorkflowDependenciesResponse
|
|
175
177
|
from eval_studio_client.api.models.v1_list_workflows_response import V1ListWorkflowsResponse
|
|
176
178
|
from eval_studio_client.api.models.v1_metric_score import V1MetricScore
|
|
177
179
|
from eval_studio_client.api.models.v1_metric_scores import V1MetricScores
|
|
@@ -187,6 +189,7 @@ from eval_studio_client.api.models.v1_perturbator_intensity import V1Perturbator
|
|
|
187
189
|
from eval_studio_client.api.models.v1_problem_and_action import V1ProblemAndAction
|
|
188
190
|
from eval_studio_client.api.models.v1_process_workflow_node_response import V1ProcessWorkflowNodeResponse
|
|
189
191
|
from eval_studio_client.api.models.v1_prompt_library_item import V1PromptLibraryItem
|
|
192
|
+
from eval_studio_client.api.models.v1_repeated_context import V1RepeatedContext
|
|
190
193
|
from eval_studio_client.api.models.v1_repeated_string import V1RepeatedString
|
|
191
194
|
from eval_studio_client.api.models.v1_reset_workflow_node_response import V1ResetWorkflowNodeResponse
|
|
192
195
|
from eval_studio_client.api.models.v1_test import V1Test
|
|
@@ -197,6 +200,7 @@ from eval_studio_client.api.models.v1_test_class import V1TestClass
|
|
|
197
200
|
from eval_studio_client.api.models.v1_test_class_type import V1TestClassType
|
|
198
201
|
from eval_studio_client.api.models.v1_test_lab import V1TestLab
|
|
199
202
|
from eval_studio_client.api.models.v1_test_suite_evaluates import V1TestSuiteEvaluates
|
|
203
|
+
from eval_studio_client.api.models.v1_test_type import V1TestType
|
|
200
204
|
from eval_studio_client.api.models.v1_update_dashboard_response import V1UpdateDashboardResponse
|
|
201
205
|
from eval_studio_client.api.models.v1_update_document_response import V1UpdateDocumentResponse
|
|
202
206
|
from eval_studio_client.api.models.v1_update_leaderboard_response import V1UpdateLeaderboardResponse
|
|
@@ -208,6 +212,7 @@ from eval_studio_client.api.models.v1_update_workflow_node_response import V1Upd
|
|
|
208
212
|
from eval_studio_client.api.models.v1_update_workflow_response import V1UpdateWorkflowResponse
|
|
209
213
|
from eval_studio_client.api.models.v1_who_am_i_response import V1WhoAmIResponse
|
|
210
214
|
from eval_studio_client.api.models.v1_workflow import V1Workflow
|
|
215
|
+
from eval_studio_client.api.models.v1_workflow_dependency import V1WorkflowDependency
|
|
211
216
|
from eval_studio_client.api.models.v1_workflow_edge import V1WorkflowEdge
|
|
212
217
|
from eval_studio_client.api.models.v1_workflow_edge_type import V1WorkflowEdgeType
|
|
213
218
|
from eval_studio_client.api.models.v1_workflow_node import V1WorkflowNode
|
|
@@ -20,6 +20,7 @@ import json
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from eval_studio_client.api.models.v1_model import V1Model
|
|
23
|
+
from eval_studio_client.api.models.v1_repeated_context import V1RepeatedContext
|
|
23
24
|
from eval_studio_client.api.models.v1_repeated_string import V1RepeatedString
|
|
24
25
|
from eval_studio_client.api.models.v1_test_cases_generator import V1TestCasesGenerator
|
|
25
26
|
from typing import Optional, Set
|
|
@@ -34,7 +35,7 @@ class PromptGenerationServiceAutoGeneratePromptsRequest(BaseModel):
|
|
|
34
35
|
count: Optional[StrictInt] = Field(default=None, description="Required. The number of TestCases to generate.")
|
|
35
36
|
base_llm_model: Optional[StrictStr] = Field(default=None, description="Required. Base LLM model to use for generating the prompts.", alias="baseLlmModel")
|
|
36
37
|
document_urls: Optional[V1RepeatedString] = Field(default=None, alias="documentUrls")
|
|
37
|
-
chunks: Optional[
|
|
38
|
+
chunks: Optional[V1RepeatedContext] = None
|
|
38
39
|
generators: Optional[List[V1TestCasesGenerator]] = Field(default=None, description="Optional. Type of questions to generate TestCases for. If not specified, all types of questions are selected.")
|
|
39
40
|
h2ogpte_collection_id: Optional[StrictStr] = Field(default=None, description="Optional. The ID of the h2oGPTe collection to use. If empty, new temporary collection will be created.", alias="h2ogpteCollectionId")
|
|
40
41
|
topics: Optional[List[StrictStr]] = Field(default=None, description="Optional. Topics to generate questions for. If not specified, use document summarization as topic generation.")
|
|
@@ -105,7 +106,7 @@ class PromptGenerationServiceAutoGeneratePromptsRequest(BaseModel):
|
|
|
105
106
|
"count": obj.get("count"),
|
|
106
107
|
"baseLlmModel": obj.get("baseLlmModel"),
|
|
107
108
|
"documentUrls": V1RepeatedString.from_dict(obj["documentUrls"]) if obj.get("documentUrls") is not None else None,
|
|
108
|
-
"chunks":
|
|
109
|
+
"chunks": V1RepeatedContext.from_dict(obj["chunks"]) if obj.get("chunks") is not None else None,
|
|
109
110
|
"generators": obj.get("generators"),
|
|
110
111
|
"h2ogpteCollectionId": obj.get("h2ogpteCollectionId"),
|
|
111
112
|
"topics": obj.get("topics")
|
|
@@ -21,6 +21,7 @@ from datetime import datetime
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from eval_studio_client.api.models.v1_dashboard_status import V1DashboardStatus
|
|
24
|
+
from eval_studio_client.api.models.v1_dashboard_type import V1DashboardType
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
26
27
|
|
|
@@ -40,7 +41,8 @@ class RequiredTheDashboardToUpdate(BaseModel):
|
|
|
40
41
|
leaderboards: Optional[List[StrictStr]] = Field(default=None, description="Immutable. Resource names of the Leaderboards used in this Dashboard.")
|
|
41
42
|
create_operation: Optional[StrictStr] = Field(default=None, description="Output only. Operation resource name that created this Dashboard.", alias="createOperation")
|
|
42
43
|
demo: Optional[StrictBool] = Field(default=None, description="Output only. Whether the Dashboard is a demo resource or not. Demo resources are read only.")
|
|
43
|
-
|
|
44
|
+
type: Optional[V1DashboardType] = None
|
|
45
|
+
__properties: ClassVar[List[str]] = ["createTime", "creator", "updateTime", "updater", "deleteTime", "deleter", "displayName", "description", "status", "leaderboards", "createOperation", "demo", "type"]
|
|
44
46
|
|
|
45
47
|
model_config = ConfigDict(
|
|
46
48
|
populate_by_name=True,
|
|
@@ -120,7 +122,8 @@ class RequiredTheDashboardToUpdate(BaseModel):
|
|
|
120
122
|
"status": obj.get("status"),
|
|
121
123
|
"leaderboards": obj.get("leaderboards"),
|
|
122
124
|
"createOperation": obj.get("createOperation"),
|
|
123
|
-
"demo": obj.get("demo")
|
|
125
|
+
"demo": obj.get("demo"),
|
|
126
|
+
"type": obj.get("type")
|
|
124
127
|
})
|
|
125
128
|
return _obj
|
|
126
129
|
|
|
@@ -20,6 +20,7 @@ import json
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from eval_studio_client.api.models.v1_test_type import V1TestType
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -38,7 +39,8 @@ class RequiredTheTestToUpdate(BaseModel):
|
|
|
38
39
|
documents: Optional[List[StrictStr]] = Field(default=None, description="Immutable. Resource names of Documents assigned to the Test.")
|
|
39
40
|
tags: Optional[List[StrictStr]] = Field(default=None, description="Tags assigned to the Test.")
|
|
40
41
|
demo: Optional[StrictBool] = Field(default=None, description="Output only. Whether the Test is a demo resource or not. Demo resources are read only.")
|
|
41
|
-
|
|
42
|
+
type: Optional[V1TestType] = None
|
|
43
|
+
__properties: ClassVar[List[str]] = ["createTime", "creator", "updateTime", "updater", "deleteTime", "deleter", "displayName", "description", "documents", "tags", "demo", "type"]
|
|
42
44
|
|
|
43
45
|
model_config = ConfigDict(
|
|
44
46
|
populate_by_name=True,
|
|
@@ -115,7 +117,8 @@ class RequiredTheTestToUpdate(BaseModel):
|
|
|
115
117
|
"description": obj.get("description"),
|
|
116
118
|
"documents": obj.get("documents"),
|
|
117
119
|
"tags": obj.get("tags"),
|
|
118
|
-
"demo": obj.get("demo")
|
|
120
|
+
"demo": obj.get("demo"),
|
|
121
|
+
"type": obj.get("type")
|
|
119
122
|
})
|
|
120
123
|
return _obj
|
|
121
124
|
|
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from eval_studio_client.api.models.v1_context import V1Context
|
|
22
23
|
from eval_studio_client.api.models.v1_test_cases_generator import V1TestCasesGenerator
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
@@ -33,7 +34,7 @@ class TestServiceGenerateTestCasesRequest(BaseModel):
|
|
|
33
34
|
generators: Optional[List[V1TestCasesGenerator]] = Field(default=None, description="Optional. Generators to use for generation. If not specified, all generators are selected.")
|
|
34
35
|
h2ogpte_collection_id: Optional[StrictStr] = Field(default=None, description="Optional. ID of the h2oGPTe collection to use. If provided, documents referenced by Test and any specified chunks are ignored. This field is required if Test does not reference any documents and no chunks are provided. If this field is left empty, a temporary collection will be created.", alias="h2ogpteCollectionId")
|
|
35
36
|
topics: Optional[List[StrictStr]] = Field(default=None, description="Optional. Topics to generate questions for. If not specified, use document summarization as topic generation.")
|
|
36
|
-
chunks: Optional[List[
|
|
37
|
+
chunks: Optional[List[V1Context]] = Field(default=None, description="Optional. The list of chunks to use for generation. If set, the Documents assigned to the Test and h2ogpte_collection_id are ignored.")
|
|
37
38
|
__properties: ClassVar[List[str]] = ["count", "model", "baseLlmModel", "generators", "h2ogpteCollectionId", "topics", "chunks"]
|
|
38
39
|
|
|
39
40
|
model_config = ConfigDict(
|
|
@@ -75,6 +76,13 @@ class TestServiceGenerateTestCasesRequest(BaseModel):
|
|
|
75
76
|
exclude=excluded_fields,
|
|
76
77
|
exclude_none=True,
|
|
77
78
|
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each item in chunks (list)
|
|
80
|
+
_items = []
|
|
81
|
+
if self.chunks:
|
|
82
|
+
for _item in self.chunks:
|
|
83
|
+
if _item:
|
|
84
|
+
_items.append(_item.to_dict())
|
|
85
|
+
_dict['chunks'] = _items
|
|
78
86
|
return _dict
|
|
79
87
|
|
|
80
88
|
@classmethod
|
|
@@ -93,7 +101,7 @@ class TestServiceGenerateTestCasesRequest(BaseModel):
|
|
|
93
101
|
"generators": obj.get("generators"),
|
|
94
102
|
"h2ogpteCollectionId": obj.get("h2ogpteCollectionId"),
|
|
95
103
|
"topics": obj.get("topics"),
|
|
96
|
-
"chunks": obj.get("chunks")
|
|
104
|
+
"chunks": [V1Context.from_dict(_item) for _item in obj["chunks"]] if obj.get("chunks") is not None else None
|
|
97
105
|
})
|
|
98
106
|
return _obj
|
|
99
107
|
|
|
@@ -26,11 +26,16 @@ class V1Context(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
V1Context
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
collection_id: Optional[StrictStr] = Field(default=None, description="Collection Id.", alias="collectionId")
|
|
30
|
-
chunk_id: Optional[StrictInt] = Field(default=None, description="Chunk Id.", alias="chunkId")
|
|
31
|
-
score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Chunk score.")
|
|
32
|
-
content: Optional[StrictStr] = Field(default=None, description="Content.")
|
|
33
|
-
|
|
29
|
+
collection_id: Optional[StrictStr] = Field(default=None, description="Optional. Collection Id.", alias="collectionId")
|
|
30
|
+
chunk_id: Optional[StrictInt] = Field(default=None, description="Required. Chunk Id.", alias="chunkId")
|
|
31
|
+
score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional. Chunk score.")
|
|
32
|
+
content: Optional[StrictStr] = Field(default=None, description="Required. Content.")
|
|
33
|
+
document_id: Optional[StrictStr] = Field(default=None, description="Optional. Document Id.", alias="documentId")
|
|
34
|
+
document_name: Optional[StrictStr] = Field(default=None, description="Optional. Document name.", alias="documentName")
|
|
35
|
+
pages: Optional[StrictStr] = Field(default=None, description="Optional. Pages.")
|
|
36
|
+
topic: Optional[StrictStr] = Field(default=None, description="Required. Topic.")
|
|
37
|
+
topic_id: Optional[StrictInt] = Field(default=None, description="Required. Topic Id.", alias="topicId")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["collectionId", "chunkId", "score", "content", "documentId", "documentName", "pages", "topic", "topicId"]
|
|
34
39
|
|
|
35
40
|
model_config = ConfigDict(
|
|
36
41
|
populate_by_name=True,
|
|
@@ -86,7 +91,12 @@ class V1Context(BaseModel):
|
|
|
86
91
|
"collectionId": obj.get("collectionId"),
|
|
87
92
|
"chunkId": obj.get("chunkId"),
|
|
88
93
|
"score": obj.get("score"),
|
|
89
|
-
"content": obj.get("content")
|
|
94
|
+
"content": obj.get("content"),
|
|
95
|
+
"documentId": obj.get("documentId"),
|
|
96
|
+
"documentName": obj.get("documentName"),
|
|
97
|
+
"pages": obj.get("pages"),
|
|
98
|
+
"topic": obj.get("topic"),
|
|
99
|
+
"topicId": obj.get("topicId")
|
|
90
100
|
})
|
|
91
101
|
return _obj
|
|
92
102
|
|