eval-studio-client 1.0.0a1__py3-none-any.whl → 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. eval_studio_client/api/__init__.py +43 -0
  2. eval_studio_client/api/api/__init__.py +5 -0
  3. eval_studio_client/api/api/human_calibration_service_api.py +304 -0
  4. eval_studio_client/api/api/perturbator_service_api.py +268 -1
  5. eval_studio_client/api/api/prompt_library_service_api.py +669 -0
  6. eval_studio_client/api/api/test_service_api.py +568 -0
  7. eval_studio_client/api/api/workflow_edge_service_api.py +296 -0
  8. eval_studio_client/api/api/workflow_node_service_api.py +1634 -0
  9. eval_studio_client/api/api/workflow_service_api.py +1609 -0
  10. eval_studio_client/api/docs/HumanCalibrationServiceApi.md +77 -0
  11. eval_studio_client/api/docs/PerturbationServiceCreatePerturbationRequest.md +1 -0
  12. eval_studio_client/api/docs/PerturbatorServiceApi.md +33 -3
  13. eval_studio_client/api/docs/PromptGenerationServiceAutoGeneratePromptsRequest.md +2 -1
  14. eval_studio_client/api/docs/PromptLibraryServiceApi.md +155 -0
  15. eval_studio_client/api/docs/ProtobufNullValue.md +12 -0
  16. eval_studio_client/api/docs/RequiredTheTestCaseToUpdate.md +1 -0
  17. eval_studio_client/api/docs/RequiredTheUpdatedWorkflow.md +44 -0
  18. eval_studio_client/api/docs/RequiredTheUpdatedWorkflowNode.md +44 -0
  19. eval_studio_client/api/docs/TestServiceApi.md +140 -0
  20. eval_studio_client/api/docs/TestServiceGenerateTestCasesRequest.md +1 -0
  21. eval_studio_client/api/docs/TestServiceImportTestCasesFromLibraryRequest.md +32 -0
  22. eval_studio_client/api/docs/TestServiceListTestCaseLibraryItemsRequest.md +35 -0
  23. eval_studio_client/api/docs/TestServicePerturbTestRequest.md +1 -0
  24. eval_studio_client/api/docs/V1BatchDeleteWorkflowsRequest.md +29 -0
  25. eval_studio_client/api/docs/V1BatchDeleteWorkflowsResponse.md +29 -0
  26. eval_studio_client/api/docs/V1BatchGetWorkflowEdgesResponse.md +29 -0
  27. eval_studio_client/api/docs/V1BatchGetWorkflowNodesResponse.md +29 -0
  28. eval_studio_client/api/docs/V1CreateEvaluationRequest.md +1 -0
  29. eval_studio_client/api/docs/V1CreateWorkflowResponse.md +29 -0
  30. eval_studio_client/api/docs/V1DeleteWorkflowNodeResponse.md +29 -0
  31. eval_studio_client/api/docs/V1DeleteWorkflowResponse.md +29 -0
  32. eval_studio_client/api/docs/V1EstimateThresholdRequest.md +33 -0
  33. eval_studio_client/api/docs/V1GetWorkflowNodePrerequisitesResponse.md +30 -0
  34. eval_studio_client/api/docs/V1GetWorkflowNodeResponse.md +29 -0
  35. eval_studio_client/api/docs/V1GetWorkflowResponse.md +29 -0
  36. eval_studio_client/api/docs/V1ImportEvaluationRequest.md +1 -0
  37. eval_studio_client/api/docs/V1ImportTestCasesFromLibraryResponse.md +29 -0
  38. eval_studio_client/api/docs/V1ImportTestCasesRequest.md +33 -0
  39. eval_studio_client/api/docs/V1LabeledTestCase.md +31 -0
  40. eval_studio_client/api/docs/V1ListPromptLibraryItemsResponse.md +29 -0
  41. eval_studio_client/api/docs/V1ListTestCaseLibraryItemsResponse.md +29 -0
  42. eval_studio_client/api/docs/V1ListWorkflowsResponse.md +29 -0
  43. eval_studio_client/api/docs/V1ProcessWorkflowNodeResponse.md +29 -0
  44. eval_studio_client/api/docs/V1PromptLibraryItem.md +42 -0
  45. eval_studio_client/api/docs/V1TestCase.md +1 -0
  46. eval_studio_client/api/docs/V1TestSuiteEvaluates.md +11 -0
  47. eval_studio_client/api/docs/V1UpdateWorkflowNodeResponse.md +29 -0
  48. eval_studio_client/api/docs/V1UpdateWorkflowResponse.md +29 -0
  49. eval_studio_client/api/docs/V1Workflow.md +46 -0
  50. eval_studio_client/api/docs/V1WorkflowEdge.md +40 -0
  51. eval_studio_client/api/docs/V1WorkflowEdgeType.md +12 -0
  52. eval_studio_client/api/docs/V1WorkflowNode.md +46 -0
  53. eval_studio_client/api/docs/V1WorkflowNodeArtifact.md +40 -0
  54. eval_studio_client/api/docs/V1WorkflowNodeArtifacts.md +29 -0
  55. eval_studio_client/api/docs/V1WorkflowNodeAttributes.md +30 -0
  56. eval_studio_client/api/docs/V1WorkflowNodeStatus.md +12 -0
  57. eval_studio_client/api/docs/V1WorkflowNodeType.md +12 -0
  58. eval_studio_client/api/docs/V1WorkflowNodeView.md +12 -0
  59. eval_studio_client/api/docs/V1WorkflowType.md +12 -0
  60. eval_studio_client/api/docs/WorkflowEdgeServiceApi.md +76 -0
  61. eval_studio_client/api/docs/WorkflowNodeServiceApi.md +423 -0
  62. eval_studio_client/api/docs/WorkflowServiceApi.md +417 -0
  63. eval_studio_client/api/models/__init__.py +38 -0
  64. eval_studio_client/api/models/perturbation_service_create_perturbation_request.py +8 -2
  65. eval_studio_client/api/models/prompt_generation_service_auto_generate_prompts_request.py +5 -3
  66. eval_studio_client/api/models/protobuf_null_value.py +36 -0
  67. eval_studio_client/api/models/required_the_test_case_to_update.py +6 -2
  68. eval_studio_client/api/models/required_the_updated_workflow.py +152 -0
  69. eval_studio_client/api/models/required_the_updated_workflow_node.py +152 -0
  70. eval_studio_client/api/models/test_service_generate_test_cases_request.py +4 -2
  71. eval_studio_client/api/models/test_service_import_test_cases_from_library_request.py +93 -0
  72. eval_studio_client/api/models/test_service_list_test_case_library_items_request.py +99 -0
  73. eval_studio_client/api/models/test_service_perturb_test_request.py +4 -2
  74. eval_studio_client/api/models/v1_batch_delete_workflows_request.py +87 -0
  75. eval_studio_client/api/models/v1_batch_delete_workflows_response.py +95 -0
  76. eval_studio_client/api/models/v1_batch_get_workflow_edges_response.py +95 -0
  77. eval_studio_client/api/models/v1_batch_get_workflow_nodes_response.py +95 -0
  78. eval_studio_client/api/models/v1_create_evaluation_request.py +7 -2
  79. eval_studio_client/api/models/v1_create_workflow_response.py +91 -0
  80. eval_studio_client/api/models/v1_delete_workflow_node_response.py +91 -0
  81. eval_studio_client/api/models/v1_delete_workflow_response.py +91 -0
  82. eval_studio_client/api/models/v1_estimate_threshold_request.py +103 -0
  83. eval_studio_client/api/models/v1_get_workflow_node_prerequisites_response.py +89 -0
  84. eval_studio_client/api/models/v1_get_workflow_node_response.py +91 -0
  85. eval_studio_client/api/models/v1_get_workflow_response.py +91 -0
  86. eval_studio_client/api/models/v1_import_evaluation_request.py +7 -2
  87. eval_studio_client/api/models/v1_import_test_cases_from_library_response.py +91 -0
  88. eval_studio_client/api/models/v1_import_test_cases_request.py +95 -0
  89. eval_studio_client/api/models/v1_labeled_test_case.py +91 -0
  90. eval_studio_client/api/models/v1_list_prompt_library_items_response.py +95 -0
  91. eval_studio_client/api/models/v1_list_test_case_library_items_response.py +95 -0
  92. eval_studio_client/api/models/v1_list_workflows_response.py +95 -0
  93. eval_studio_client/api/models/v1_process_workflow_node_response.py +91 -0
  94. eval_studio_client/api/models/v1_prompt_library_item.py +129 -0
  95. eval_studio_client/api/models/v1_test_case.py +6 -2
  96. eval_studio_client/api/models/v1_test_suite_evaluates.py +39 -0
  97. eval_studio_client/api/models/v1_update_workflow_node_response.py +91 -0
  98. eval_studio_client/api/models/v1_update_workflow_response.py +91 -0
  99. eval_studio_client/api/models/v1_workflow.py +156 -0
  100. eval_studio_client/api/models/v1_workflow_edge.py +123 -0
  101. eval_studio_client/api/models/v1_workflow_edge_type.py +37 -0
  102. eval_studio_client/api/models/v1_workflow_node.py +156 -0
  103. eval_studio_client/api/models/v1_workflow_node_artifact.py +122 -0
  104. eval_studio_client/api/models/v1_workflow_node_artifacts.py +97 -0
  105. eval_studio_client/api/models/v1_workflow_node_attributes.py +87 -0
  106. eval_studio_client/api/models/v1_workflow_node_status.py +40 -0
  107. eval_studio_client/api/models/v1_workflow_node_type.py +41 -0
  108. eval_studio_client/api/models/v1_workflow_node_view.py +38 -0
  109. eval_studio_client/api/models/v1_workflow_type.py +37 -0
  110. eval_studio_client/api/test/test_human_calibration_service_api.py +38 -0
  111. eval_studio_client/api/test/test_perturbation_service_create_perturbation_request.py +20 -2
  112. eval_studio_client/api/test/test_prompt_generation_service_auto_generate_prompts_request.py +4 -1
  113. eval_studio_client/api/test/test_prompt_library_service_api.py +43 -0
  114. eval_studio_client/api/test/test_protobuf_null_value.py +33 -0
  115. eval_studio_client/api/test/test_required_the_test_case_to_update.py +4 -1
  116. eval_studio_client/api/test/test_required_the_updated_workflow.py +88 -0
  117. eval_studio_client/api/test/test_required_the_updated_workflow_node.py +80 -0
  118. eval_studio_client/api/test/test_test_service_api.py +12 -0
  119. eval_studio_client/api/test/test_test_service_generate_test_cases_request.py +4 -1
  120. eval_studio_client/api/test/test_test_service_import_test_cases_from_library_request.py +56 -0
  121. eval_studio_client/api/test/test_test_service_list_test_case_library_items_request.py +63 -0
  122. eval_studio_client/api/test/test_test_service_perturb_test_request.py +4 -1
  123. eval_studio_client/api/test/test_v1_batch_delete_test_cases_response.py +4 -1
  124. eval_studio_client/api/test/test_v1_batch_delete_workflows_request.py +53 -0
  125. eval_studio_client/api/test/test_v1_batch_delete_workflows_response.py +92 -0
  126. eval_studio_client/api/test/test_v1_batch_get_workflow_edges_response.py +64 -0
  127. eval_studio_client/api/test/test_v1_batch_get_workflow_nodes_response.py +84 -0
  128. eval_studio_client/api/test/test_v1_create_evaluation_request.py +20 -2
  129. eval_studio_client/api/test/test_v1_create_test_case_response.py +4 -1
  130. eval_studio_client/api/test/test_v1_create_workflow_response.py +90 -0
  131. eval_studio_client/api/test/test_v1_delete_test_case_response.py +4 -1
  132. eval_studio_client/api/test/test_v1_delete_workflow_node_response.py +82 -0
  133. eval_studio_client/api/test/test_v1_delete_workflow_response.py +90 -0
  134. eval_studio_client/api/test/test_v1_estimate_threshold_request.py +60 -0
  135. eval_studio_client/api/test/test_v1_evaluation_test.py +4 -1
  136. eval_studio_client/api/test/test_v1_find_all_test_cases_by_id_response.py +4 -1
  137. eval_studio_client/api/test/test_v1_get_test_case_response.py +4 -1
  138. eval_studio_client/api/test/test_v1_get_workflow_node_prerequisites_response.py +56 -0
  139. eval_studio_client/api/test/test_v1_get_workflow_node_response.py +82 -0
  140. eval_studio_client/api/test/test_v1_get_workflow_response.py +90 -0
  141. eval_studio_client/api/test/test_v1_import_evaluation_request.py +16 -1
  142. eval_studio_client/api/test/test_v1_import_test_cases_from_library_response.py +71 -0
  143. eval_studio_client/api/test/test_v1_import_test_cases_request.py +57 -0
  144. eval_studio_client/api/test/test_v1_labeled_test_case.py +53 -0
  145. eval_studio_client/api/test/test_v1_list_prompt_library_items_response.py +71 -0
  146. eval_studio_client/api/test/test_v1_list_test_case_library_items_response.py +71 -0
  147. eval_studio_client/api/test/test_v1_list_test_cases_response.py +4 -1
  148. eval_studio_client/api/test/test_v1_list_workflows_response.py +92 -0
  149. eval_studio_client/api/test/test_v1_process_workflow_node_response.py +71 -0
  150. eval_studio_client/api/test/test_v1_prompt_library_item.py +68 -0
  151. eval_studio_client/api/test/test_v1_test_case.py +4 -1
  152. eval_studio_client/api/test/test_v1_test_suite_evaluates.py +33 -0
  153. eval_studio_client/api/test/test_v1_update_test_case_response.py +4 -1
  154. eval_studio_client/api/test/test_v1_update_workflow_node_response.py +82 -0
  155. eval_studio_client/api/test/test_v1_update_workflow_response.py +90 -0
  156. eval_studio_client/api/test/test_v1_workflow.py +89 -0
  157. eval_studio_client/api/test/test_v1_workflow_edge.py +61 -0
  158. eval_studio_client/api/test/test_v1_workflow_edge_type.py +33 -0
  159. eval_studio_client/api/test/test_v1_workflow_node.py +81 -0
  160. eval_studio_client/api/test/test_v1_workflow_node_artifact.py +61 -0
  161. eval_studio_client/api/test/test_v1_workflow_node_artifacts.py +64 -0
  162. eval_studio_client/api/test/test_v1_workflow_node_attributes.py +51 -0
  163. eval_studio_client/api/test/test_v1_workflow_node_status.py +33 -0
  164. eval_studio_client/api/test/test_v1_workflow_node_type.py +33 -0
  165. eval_studio_client/api/test/test_v1_workflow_node_view.py +33 -0
  166. eval_studio_client/api/test/test_v1_workflow_type.py +33 -0
  167. eval_studio_client/api/test/test_workflow_edge_service_api.py +38 -0
  168. eval_studio_client/api/test/test_workflow_node_service_api.py +73 -0
  169. eval_studio_client/api/test/test_workflow_service_api.py +73 -0
  170. eval_studio_client/client.py +7 -0
  171. eval_studio_client/dashboards.py +66 -18
  172. eval_studio_client/gen/openapiv2/eval_studio.swagger.json +2665 -794
  173. eval_studio_client/leaderboards.py +125 -0
  174. eval_studio_client/models.py +3 -42
  175. eval_studio_client/test_labs.py +49 -21
  176. eval_studio_client/tests.py +221 -51
  177. eval_studio_client/utils.py +26 -0
  178. {eval_studio_client-1.0.0a1.dist-info → eval_studio_client-1.0.1.dist-info}/METADATA +1 -2
  179. {eval_studio_client-1.0.0a1.dist-info → eval_studio_client-1.0.1.dist-info}/RECORD +180 -50
  180. {eval_studio_client-1.0.0a1.dist-info → eval_studio_client-1.0.1.dist-info}/WHEEL +1 -1
@@ -38,7 +38,8 @@ class RequiredTheTestCaseToUpdate(BaseModel):
38
38
  answer: Optional[StrictStr] = Field(default=None, description="Expected answer text. Model output.")
39
39
  constraints: Optional[List[StrictStr]] = Field(default=None, description="Constraints on the model output.")
40
40
  condition: Optional[StrictStr] = Field(default=None, description="Optional. Test case output condition, in a form of AIP-160 compliant filter expression.")
41
- __properties: ClassVar[List[str]] = ["createTime", "creator", "updateTime", "updater", "deleteTime", "deleter", "parent", "prompt", "answer", "constraints", "condition"]
41
+ perturbed_by: Optional[List[StrictStr]] = Field(default=None, description="Output only. The list of perturbators applied to this test case.", alias="perturbedBy")
42
+ __properties: ClassVar[List[str]] = ["createTime", "creator", "updateTime", "updater", "deleteTime", "deleter", "parent", "prompt", "answer", "constraints", "condition", "perturbedBy"]
42
43
 
43
44
  model_config = ConfigDict(
44
45
  populate_by_name=True,
@@ -76,6 +77,7 @@ class RequiredTheTestCaseToUpdate(BaseModel):
76
77
  * OpenAPI `readOnly` fields are excluded.
77
78
  * OpenAPI `readOnly` fields are excluded.
78
79
  * OpenAPI `readOnly` fields are excluded.
80
+ * OpenAPI `readOnly` fields are excluded.
79
81
  """
80
82
  excluded_fields: Set[str] = set([
81
83
  "create_time",
@@ -84,6 +86,7 @@ class RequiredTheTestCaseToUpdate(BaseModel):
84
86
  "updater",
85
87
  "delete_time",
86
88
  "deleter",
89
+ "perturbed_by",
87
90
  ])
88
91
 
89
92
  _dict = self.model_dump(
@@ -113,7 +116,8 @@ class RequiredTheTestCaseToUpdate(BaseModel):
113
116
  "prompt": obj.get("prompt"),
114
117
  "answer": obj.get("answer"),
115
118
  "constraints": obj.get("constraints"),
116
- "condition": obj.get("condition")
119
+ "condition": obj.get("condition"),
120
+ "perturbedBy": obj.get("perturbedBy")
117
121
  })
118
122
  return _obj
119
123
 
@@ -0,0 +1,152 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/collection.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from eval_studio_client.api.models.v1_workflow_node_artifacts import V1WorkflowNodeArtifacts
24
+ from eval_studio_client.api.models.v1_workflow_type import V1WorkflowType
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class RequiredTheUpdatedWorkflow(BaseModel):
29
+ """
30
+ RequiredTheUpdatedWorkflow
31
+ """ # noqa: E501
32
+ display_name: Optional[StrictStr] = Field(default=None, description="Human-readable name of the Workflow.", alias="displayName")
33
+ description: Optional[StrictStr] = Field(default=None, description="Optional description of the Workflow.")
34
+ create_time: Optional[datetime] = Field(default=None, description="Output only. Immutable. Creation time of the Workflow.", alias="createTime")
35
+ creator: Optional[StrictStr] = Field(default=None, description="Output only. Immutable. Name of the user or service that requested creation of the Workflow.")
36
+ update_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Last update time of the Workflow.", alias="updateTime")
37
+ updater: Optional[StrictStr] = Field(default=None, description="Output only. Name of the user or service that requested update of the Workflow.")
38
+ delete_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Deletion time of the Workflow.", alias="deleteTime")
39
+ deleter: Optional[StrictStr] = Field(default=None, description="Output only. Name of the user or service that requested deletion of the Workflow.")
40
+ type: Optional[V1WorkflowType] = None
41
+ model: Optional[StrictStr] = Field(default=None, description="Immutable. Resource name of the Model associated with this Workflow.")
42
+ nodes: Optional[List[StrictStr]] = Field(default=None, description="Output only. List of the WorkflowNodes in the Workflow.")
43
+ edges: Optional[List[StrictStr]] = Field(default=None, description="Output only. List of the WorkflowEdges in the Workflow.")
44
+ outputs: Optional[Dict[str, Dict[str, Any]]] = Field(default=None, description="Output only. Optional. Computed outputs of all the WorkflowNodes in the Workflow.")
45
+ output_artifacts: Optional[Dict[str, V1WorkflowNodeArtifacts]] = Field(default=None, description="Output only. Optional. List of the WorkflowNodeArtifacts produces by all the WorkflowNodes in the Workflow.", alias="outputArtifacts")
46
+ llm_model: Optional[StrictStr] = Field(default=None, description="Immutable. LLM Model to use.", alias="llmModel")
47
+ model_parameters: Optional[StrictStr] = Field(default=None, description="Optional. Immutable. Model parameter overrides in JSON format.", alias="modelParameters")
48
+ __properties: ClassVar[List[str]] = ["displayName", "description", "createTime", "creator", "updateTime", "updater", "deleteTime", "deleter", "type", "model", "nodes", "edges", "outputs", "outputArtifacts", "llmModel", "modelParameters"]
49
+
50
+ model_config = ConfigDict(
51
+ populate_by_name=True,
52
+ validate_assignment=True,
53
+ protected_namespaces=(),
54
+ )
55
+
56
+
57
+ def to_str(self) -> str:
58
+ """Returns the string representation of the model using alias"""
59
+ return pprint.pformat(self.model_dump(by_alias=True))
60
+
61
+ def to_json(self) -> str:
62
+ """Returns the JSON representation of the model using alias"""
63
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
64
+ return json.dumps(self.to_dict())
65
+
66
+ @classmethod
67
+ def from_json(cls, json_str: str) -> Optional[Self]:
68
+ """Create an instance of RequiredTheUpdatedWorkflow from a JSON string"""
69
+ return cls.from_dict(json.loads(json_str))
70
+
71
+ def to_dict(self) -> Dict[str, Any]:
72
+ """Return the dictionary representation of the model using alias.
73
+
74
+ This has the following differences from calling pydantic's
75
+ `self.model_dump(by_alias=True)`:
76
+
77
+ * `None` is only added to the output dict for nullable fields that
78
+ were set at model initialization. Other fields with value `None`
79
+ are ignored.
80
+ * OpenAPI `readOnly` fields are excluded.
81
+ * OpenAPI `readOnly` fields are excluded.
82
+ * OpenAPI `readOnly` fields are excluded.
83
+ * OpenAPI `readOnly` fields are excluded.
84
+ * OpenAPI `readOnly` fields are excluded.
85
+ * OpenAPI `readOnly` fields are excluded.
86
+ * OpenAPI `readOnly` fields are excluded.
87
+ * OpenAPI `readOnly` fields are excluded.
88
+ * OpenAPI `readOnly` fields are excluded.
89
+ * OpenAPI `readOnly` fields are excluded.
90
+ """
91
+ excluded_fields: Set[str] = set([
92
+ "create_time",
93
+ "creator",
94
+ "update_time",
95
+ "updater",
96
+ "delete_time",
97
+ "deleter",
98
+ "nodes",
99
+ "edges",
100
+ "outputs",
101
+ "output_artifacts",
102
+ ])
103
+
104
+ _dict = self.model_dump(
105
+ by_alias=True,
106
+ exclude=excluded_fields,
107
+ exclude_none=True,
108
+ )
109
+ # override the default output from pydantic by calling `to_dict()` of each value in output_artifacts (dict)
110
+ _field_dict = {}
111
+ if self.output_artifacts:
112
+ for _key in self.output_artifacts:
113
+ if self.output_artifacts[_key]:
114
+ _field_dict[_key] = self.output_artifacts[_key].to_dict()
115
+ _dict['outputArtifacts'] = _field_dict
116
+ return _dict
117
+
118
+ @classmethod
119
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
120
+ """Create an instance of RequiredTheUpdatedWorkflow from a dict"""
121
+ if obj is None:
122
+ return None
123
+
124
+ if not isinstance(obj, dict):
125
+ return cls.model_validate(obj)
126
+
127
+ _obj = cls.model_validate({
128
+ "displayName": obj.get("displayName"),
129
+ "description": obj.get("description"),
130
+ "createTime": obj.get("createTime"),
131
+ "creator": obj.get("creator"),
132
+ "updateTime": obj.get("updateTime"),
133
+ "updater": obj.get("updater"),
134
+ "deleteTime": obj.get("deleteTime"),
135
+ "deleter": obj.get("deleter"),
136
+ "type": obj.get("type"),
137
+ "model": obj.get("model"),
138
+ "nodes": obj.get("nodes"),
139
+ "edges": obj.get("edges"),
140
+ "outputs": obj.get("outputs"),
141
+ "outputArtifacts": dict(
142
+ (_k, V1WorkflowNodeArtifacts.from_dict(_v))
143
+ for _k, _v in obj["outputArtifacts"].items()
144
+ )
145
+ if obj.get("outputArtifacts") is not None
146
+ else None,
147
+ "llmModel": obj.get("llmModel"),
148
+ "modelParameters": obj.get("modelParameters")
149
+ })
150
+ return _obj
151
+
152
+
@@ -0,0 +1,152 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/collection.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from eval_studio_client.api.models.v1_workflow_node_artifact import V1WorkflowNodeArtifact
24
+ from eval_studio_client.api.models.v1_workflow_node_attributes import V1WorkflowNodeAttributes
25
+ from eval_studio_client.api.models.v1_workflow_node_status import V1WorkflowNodeStatus
26
+ from eval_studio_client.api.models.v1_workflow_node_type import V1WorkflowNodeType
27
+ from typing import Optional, Set
28
+ from typing_extensions import Self
29
+
30
+ class RequiredTheUpdatedWorkflowNode(BaseModel):
31
+ """
32
+ RequiredTheUpdatedWorkflowNode
33
+ """ # noqa: E501
34
+ parent: Optional[StrictStr] = Field(default=None, description="Output only. Immutable. Resource name of the parent Workflow in format of `workflows/{workflow_id}/`.")
35
+ display_name: Optional[StrictStr] = Field(default=None, description="Human-readable name of the WorkflowNode.", alias="displayName")
36
+ description: Optional[StrictStr] = Field(default=None, description="Optional description of the WorkflowNode.")
37
+ create_time: Optional[datetime] = Field(default=None, description="Output only. Immutable. Creation time of the WorkflowNode.", alias="createTime")
38
+ creator: Optional[StrictStr] = Field(default=None, description="Output only. Immutable. Name of the user or service that requested creation of the WorkflowNode.")
39
+ update_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Last update time of the WorkflowNode.", alias="updateTime")
40
+ updater: Optional[StrictStr] = Field(default=None, description="Output only. Name of the user or service that requested update of the WorkflowNode.")
41
+ delete_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Deletion time of the WorkflowNode.", alias="deleteTime")
42
+ deleter: Optional[StrictStr] = Field(default=None, description="Output only. Name of the user or service that requested deletion of the WorkflowNode.")
43
+ type: Optional[V1WorkflowNodeType] = None
44
+ parameters: Optional[Dict[str, Any]] = Field(default=None, description="User-given parameters for the WorkflowNode.")
45
+ outputs: Optional[Dict[str, Any]] = Field(default=None, description="Output only. Computed outputs of the WorkflowNode.")
46
+ output_artifacts: Optional[List[V1WorkflowNodeArtifact]] = Field(default=None, description="Output only. Optional. List of the WorkflowNodeArtifacts produces by the WorkflowNode.", alias="outputArtifacts")
47
+ status: Optional[V1WorkflowNodeStatus] = None
48
+ attributes: Optional[V1WorkflowNodeAttributes] = None
49
+ processed_by_operation: Optional[StrictStr] = Field(default=None, description="Output only. Optional. Resource name of the latest Operation that has processed or is currently processing this WorkflowNode.", alias="processedByOperation")
50
+ __properties: ClassVar[List[str]] = ["parent", "displayName", "description", "createTime", "creator", "updateTime", "updater", "deleteTime", "deleter", "type", "parameters", "outputs", "outputArtifacts", "status", "attributes", "processedByOperation"]
51
+
52
+ model_config = ConfigDict(
53
+ populate_by_name=True,
54
+ validate_assignment=True,
55
+ protected_namespaces=(),
56
+ )
57
+
58
+
59
+ def to_str(self) -> str:
60
+ """Returns the string representation of the model using alias"""
61
+ return pprint.pformat(self.model_dump(by_alias=True))
62
+
63
+ def to_json(self) -> str:
64
+ """Returns the JSON representation of the model using alias"""
65
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
66
+ return json.dumps(self.to_dict())
67
+
68
+ @classmethod
69
+ def from_json(cls, json_str: str) -> Optional[Self]:
70
+ """Create an instance of RequiredTheUpdatedWorkflowNode from a JSON string"""
71
+ return cls.from_dict(json.loads(json_str))
72
+
73
+ def to_dict(self) -> Dict[str, Any]:
74
+ """Return the dictionary representation of the model using alias.
75
+
76
+ This has the following differences from calling pydantic's
77
+ `self.model_dump(by_alias=True)`:
78
+
79
+ * `None` is only added to the output dict for nullable fields that
80
+ were set at model initialization. Other fields with value `None`
81
+ are ignored.
82
+ * OpenAPI `readOnly` fields are excluded.
83
+ * OpenAPI `readOnly` fields are excluded.
84
+ * OpenAPI `readOnly` fields are excluded.
85
+ * OpenAPI `readOnly` fields are excluded.
86
+ * OpenAPI `readOnly` fields are excluded.
87
+ * OpenAPI `readOnly` fields are excluded.
88
+ * OpenAPI `readOnly` fields are excluded.
89
+ * OpenAPI `readOnly` fields are excluded.
90
+ * OpenAPI `readOnly` fields are excluded.
91
+ * OpenAPI `readOnly` fields are excluded.
92
+ """
93
+ excluded_fields: Set[str] = set([
94
+ "parent",
95
+ "create_time",
96
+ "creator",
97
+ "update_time",
98
+ "updater",
99
+ "delete_time",
100
+ "deleter",
101
+ "outputs",
102
+ "output_artifacts",
103
+ "processed_by_operation",
104
+ ])
105
+
106
+ _dict = self.model_dump(
107
+ by_alias=True,
108
+ exclude=excluded_fields,
109
+ exclude_none=True,
110
+ )
111
+ # override the default output from pydantic by calling `to_dict()` of each item in output_artifacts (list)
112
+ _items = []
113
+ if self.output_artifacts:
114
+ for _item in self.output_artifacts:
115
+ if _item:
116
+ _items.append(_item.to_dict())
117
+ _dict['outputArtifacts'] = _items
118
+ # override the default output from pydantic by calling `to_dict()` of attributes
119
+ if self.attributes:
120
+ _dict['attributes'] = self.attributes.to_dict()
121
+ return _dict
122
+
123
+ @classmethod
124
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
125
+ """Create an instance of RequiredTheUpdatedWorkflowNode from a dict"""
126
+ if obj is None:
127
+ return None
128
+
129
+ if not isinstance(obj, dict):
130
+ return cls.model_validate(obj)
131
+
132
+ _obj = cls.model_validate({
133
+ "parent": obj.get("parent"),
134
+ "displayName": obj.get("displayName"),
135
+ "description": obj.get("description"),
136
+ "createTime": obj.get("createTime"),
137
+ "creator": obj.get("creator"),
138
+ "updateTime": obj.get("updateTime"),
139
+ "updater": obj.get("updater"),
140
+ "deleteTime": obj.get("deleteTime"),
141
+ "deleter": obj.get("deleter"),
142
+ "type": obj.get("type"),
143
+ "parameters": obj.get("parameters"),
144
+ "outputs": obj.get("outputs"),
145
+ "outputArtifacts": [V1WorkflowNodeArtifact.from_dict(_item) for _item in obj["outputArtifacts"]] if obj.get("outputArtifacts") is not None else None,
146
+ "status": obj.get("status"),
147
+ "attributes": V1WorkflowNodeAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None,
148
+ "processedByOperation": obj.get("processedByOperation")
149
+ })
150
+ return _obj
151
+
152
+
@@ -32,7 +32,8 @@ class TestServiceGenerateTestCasesRequest(BaseModel):
32
32
  base_llm_model: Optional[StrictStr] = Field(default=None, description="Optional. The base LLM model to use for generating the prompts. Selected automatically if not specified.", alias="baseLlmModel")
33
33
  generators: Optional[List[V1TestCasesGenerator]] = Field(default=None, description="Optional. Generators to use for generation. If not specified, all generators are selected.")
34
34
  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")
35
- __properties: ClassVar[List[str]] = ["count", "model", "baseLlmModel", "generators", "h2ogpteCollectionId"]
35
+ topics: Optional[List[StrictStr]] = Field(default=None, description="Optional. Optional. Topics to generate questions for. If not specified, use document summarization as topic generation.")
36
+ __properties: ClassVar[List[str]] = ["count", "model", "baseLlmModel", "generators", "h2ogpteCollectionId", "topics"]
36
37
 
37
38
  model_config = ConfigDict(
38
39
  populate_by_name=True,
@@ -89,7 +90,8 @@ class TestServiceGenerateTestCasesRequest(BaseModel):
89
90
  "model": obj.get("model"),
90
91
  "baseLlmModel": obj.get("baseLlmModel"),
91
92
  "generators": obj.get("generators"),
92
- "h2ogpteCollectionId": obj.get("h2ogpteCollectionId")
93
+ "h2ogpteCollectionId": obj.get("h2ogpteCollectionId"),
94
+ "topics": obj.get("topics")
93
95
  })
94
96
  return _obj
95
97
 
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/collection.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class TestServiceImportTestCasesFromLibraryRequest(BaseModel):
26
+ """
27
+ TestServiceImportTestCasesFromLibraryRequest
28
+ """ # noqa: E501
29
+ operation: Optional[StrictStr] = Field(default=None, description="Required. The Operation processing this prompt library retrieval process.")
30
+ test_suite_url: Optional[StrictStr] = Field(default=None, description="Required. The URL of the library test suite to get TestCases from (sample).", alias="testSuiteUrl")
31
+ count: Optional[StrictInt] = Field(default=None, description="Required. The number of TestCases to get from the library.")
32
+ test_document_urls: Optional[List[StrictStr]] = Field(default=None, description="Optional. The list of target Test corpus document URLs to skip when returning library TestCases corpus.", alias="testDocumentUrls")
33
+ __properties: ClassVar[List[str]] = ["operation", "testSuiteUrl", "count", "testDocumentUrls"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of TestServiceImportTestCasesFromLibraryRequest from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of TestServiceImportTestCasesFromLibraryRequest from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "operation": obj.get("operation"),
87
+ "testSuiteUrl": obj.get("testSuiteUrl"),
88
+ "count": obj.get("count"),
89
+ "testDocumentUrls": obj.get("testDocumentUrls")
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,99 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/collection.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class TestServiceListTestCaseLibraryItemsRequest(BaseModel):
26
+ """
27
+ TestServiceListTestCaseLibraryItemsRequest
28
+ """ # noqa: E501
29
+ filter_by_categories: Optional[List[StrictStr]] = Field(default=None, description="Optional. Filter by categories.", alias="filterByCategories")
30
+ filter_by_purposes: Optional[List[StrictStr]] = Field(default=None, description="Optional. Filter by purposes.", alias="filterByPurposes")
31
+ filter_by_evaluates: Optional[List[StrictStr]] = Field(default=None, description="Optional. Filter by evaluates.", alias="filterByEvaluates")
32
+ filter_by_origin: Optional[StrictStr] = Field(default=None, description="Optional. Filter by origin.", alias="filterByOrigin")
33
+ filter_by_test_case_count: Optional[StrictInt] = Field(default=None, description="Optional. Filter by test case count.", alias="filterByTestCaseCount")
34
+ filter_by_test_count: Optional[StrictInt] = Field(default=None, description="Optional. Filter by test count.", alias="filterByTestCount")
35
+ filter_by_fts: Optional[StrictStr] = Field(default=None, description="Optional. Filter by FTS.", alias="filterByFts")
36
+ __properties: ClassVar[List[str]] = ["filterByCategories", "filterByPurposes", "filterByEvaluates", "filterByOrigin", "filterByTestCaseCount", "filterByTestCount", "filterByFts"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of TestServiceListTestCaseLibraryItemsRequest from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of TestServiceListTestCaseLibraryItemsRequest from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "filterByCategories": obj.get("filterByCategories"),
90
+ "filterByPurposes": obj.get("filterByPurposes"),
91
+ "filterByEvaluates": obj.get("filterByEvaluates"),
92
+ "filterByOrigin": obj.get("filterByOrigin"),
93
+ "filterByTestCaseCount": obj.get("filterByTestCaseCount"),
94
+ "filterByTestCount": obj.get("filterByTestCount"),
95
+ "filterByFts": obj.get("filterByFts")
96
+ })
97
+ return _obj
98
+
99
+
@@ -30,7 +30,8 @@ class TestServicePerturbTestRequest(BaseModel):
30
30
  perturbator_configurations: Optional[List[V1PerturbatorConfiguration]] = Field(default=None, description="Required. PerturbatorConfigurations to apply to the Test.", alias="perturbatorConfigurations")
31
31
  new_test_display_name: Optional[StrictStr] = Field(default=None, description="Required. Name of the newly created test.", alias="newTestDisplayName")
32
32
  new_test_description: Optional[StrictStr] = Field(default=None, description="Optional. Description of the newly created Test.", alias="newTestDescription")
33
- __properties: ClassVar[List[str]] = ["perturbatorConfigurations", "newTestDisplayName", "newTestDescription"]
33
+ test_case_names: Optional[List[StrictStr]] = Field(default=None, description="Optional. Perturbation apply only to selected testCases.", alias="testCaseNames")
34
+ __properties: ClassVar[List[str]] = ["perturbatorConfigurations", "newTestDisplayName", "newTestDescription", "testCaseNames"]
34
35
 
35
36
  model_config = ConfigDict(
36
37
  populate_by_name=True,
@@ -92,7 +93,8 @@ class TestServicePerturbTestRequest(BaseModel):
92
93
  _obj = cls.model_validate({
93
94
  "perturbatorConfigurations": [V1PerturbatorConfiguration.from_dict(_item) for _item in obj["perturbatorConfigurations"]] if obj.get("perturbatorConfigurations") is not None else None,
94
95
  "newTestDisplayName": obj.get("newTestDisplayName"),
95
- "newTestDescription": obj.get("newTestDescription")
96
+ "newTestDescription": obj.get("newTestDescription"),
97
+ "testCaseNames": obj.get("testCaseNames")
96
98
  })
97
99
  return _obj
98
100
 
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/collection.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class V1BatchDeleteWorkflowsRequest(BaseModel):
26
+ """
27
+ V1BatchDeleteWorkflowsRequest
28
+ """ # noqa: E501
29
+ names: Optional[List[StrictStr]] = Field(default=None, description="Required. The names of the Workflows to delete. A maximum of 1000 can be specified.")
30
+ __properties: ClassVar[List[str]] = ["names"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of V1BatchDeleteWorkflowsRequest from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of V1BatchDeleteWorkflowsRequest from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "names": obj.get("names")
84
+ })
85
+ return _obj
86
+
87
+