eval-studio-client 0.7.0__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/__about__.py +1 -0
- eval_studio_client/__init__.py +4 -0
- eval_studio_client/api/__init__.py +180 -0
- eval_studio_client/api/api/__init__.py +20 -0
- eval_studio_client/api/api/dashboard_service_api.py +2142 -0
- eval_studio_client/api/api/document_service_api.py +1868 -0
- eval_studio_client/api/api/evaluation_service_api.py +1603 -0
- eval_studio_client/api/api/evaluator_service_api.py +1343 -0
- eval_studio_client/api/api/info_service_api.py +275 -0
- eval_studio_client/api/api/leaderboard_service_api.py +3336 -0
- eval_studio_client/api/api/model_service_api.py +2913 -0
- eval_studio_client/api/api/operation_progress_service_api.py +292 -0
- eval_studio_client/api/api/operation_service_api.py +1359 -0
- eval_studio_client/api/api/perturbation_service_api.py +321 -0
- eval_studio_client/api/api/perturbator_service_api.py +532 -0
- eval_studio_client/api/api/test_case_service_api.py +1913 -0
- eval_studio_client/api/api/test_class_service_api.py +532 -0
- eval_studio_client/api/api/test_lab_service_api.py +634 -0
- eval_studio_client/api/api/test_service_api.py +2712 -0
- eval_studio_client/api/api/who_am_i_service_api.py +275 -0
- eval_studio_client/api/api_client.py +770 -0
- eval_studio_client/api/api_response.py +21 -0
- eval_studio_client/api/configuration.py +436 -0
- eval_studio_client/api/docs/DashboardServiceApi.md +549 -0
- eval_studio_client/api/docs/DocumentServiceApi.md +478 -0
- eval_studio_client/api/docs/EvaluationServiceApi.md +332 -0
- eval_studio_client/api/docs/EvaluatorServiceApi.md +345 -0
- eval_studio_client/api/docs/InfoServiceApi.md +71 -0
- eval_studio_client/api/docs/LeaderboardServiceApi.md +835 -0
- eval_studio_client/api/docs/ModelServiceApi.md +750 -0
- eval_studio_client/api/docs/OperationProgressServiceApi.md +75 -0
- eval_studio_client/api/docs/OperationServiceApi.md +345 -0
- eval_studio_client/api/docs/PerturbationServiceApi.md +78 -0
- eval_studio_client/api/docs/PerturbationServiceCreatePerturbationRequest.md +31 -0
- eval_studio_client/api/docs/PerturbatorServiceApi.md +138 -0
- eval_studio_client/api/docs/ProtobufAny.md +30 -0
- eval_studio_client/api/docs/RequiredTheDashboardToUpdate.md +41 -0
- eval_studio_client/api/docs/RequiredTheDocumentToUpdate.md +38 -0
- eval_studio_client/api/docs/RequiredTheLeaderboardToUpdate.md +54 -0
- eval_studio_client/api/docs/RequiredTheModelToUpdate.md +41 -0
- eval_studio_client/api/docs/RequiredTheOperationToFinalize.md +39 -0
- eval_studio_client/api/docs/RequiredTheOperationToUpdate.md +39 -0
- eval_studio_client/api/docs/RequiredTheTestCaseToUpdate.md +39 -0
- eval_studio_client/api/docs/RequiredTheTestToUpdate.md +39 -0
- eval_studio_client/api/docs/RpcStatus.md +32 -0
- eval_studio_client/api/docs/TestCaseServiceApi.md +486 -0
- eval_studio_client/api/docs/TestCaseServiceBatchDeleteTestCasesRequest.md +29 -0
- eval_studio_client/api/docs/TestClassServiceApi.md +138 -0
- eval_studio_client/api/docs/TestLabServiceApi.md +151 -0
- eval_studio_client/api/docs/TestServiceApi.md +689 -0
- eval_studio_client/api/docs/TestServicePerturbTestRequest.md +31 -0
- eval_studio_client/api/docs/V1alphaBatchCreateLeaderboardsRequest.md +31 -0
- eval_studio_client/api/docs/V1alphaBatchCreateLeaderboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteDashboardsRequest.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteDashboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteDocumentsRequest.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteDocumentsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteEvaluatorsRequest.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteEvaluatorsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteLeaderboardsRequest.md +30 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteLeaderboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteModelsRequest.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteTestCasesResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteTestsRequest.md +30 -0
- eval_studio_client/api/docs/V1alphaBatchDeleteTestsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetDashboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetDocumentsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetLeaderboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetOperationsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchGetTestsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchImportLeaderboardRequest.md +37 -0
- eval_studio_client/api/docs/V1alphaBatchImportLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaBatchImportTestsRequest.md +32 -0
- eval_studio_client/api/docs/V1alphaBatchImportTestsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCheckBaseModelsResponse.md +30 -0
- eval_studio_client/api/docs/V1alphaCollectionInfo.md +33 -0
- eval_studio_client/api/docs/V1alphaCreateDashboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateDocumentResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateEvaluationRequest.md +37 -0
- eval_studio_client/api/docs/V1alphaCreateEvaluatorResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateLeaderboardRequest.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateLeaderboardWithoutCacheResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateModelResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreatePerturbationResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateTestCaseResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateTestLabResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaCreateTestResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDashboard.md +41 -0
- eval_studio_client/api/docs/V1alphaDashboardStatus.md +12 -0
- eval_studio_client/api/docs/V1alphaDeleteDashboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteDocumentResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteEvaluatorResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteModelResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteTestCaseResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDeleteTestResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaDocument.md +38 -0
- eval_studio_client/api/docs/V1alphaEvaluationTest.md +32 -0
- eval_studio_client/api/docs/V1alphaEvaluator.md +45 -0
- eval_studio_client/api/docs/V1alphaEvaluatorParamType.md +12 -0
- eval_studio_client/api/docs/V1alphaEvaluatorParameter.md +40 -0
- eval_studio_client/api/docs/V1alphaEvaluatorView.md +12 -0
- eval_studio_client/api/docs/V1alphaFinalizeOperationResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaFindAllTestCasesByIDResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaFindTestLabResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetDashboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetDocumentResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetEvaluatorResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetInfoResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetModelResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetOperationProgressByParentResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetOperationResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetPerturbatorResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetTestCaseResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetTestClassResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaGetTestResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaImportEvaluationRequest.md +33 -0
- eval_studio_client/api/docs/V1alphaImportLeaderboardRequest.md +37 -0
- eval_studio_client/api/docs/V1alphaImportLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaInfo.md +35 -0
- eval_studio_client/api/docs/V1alphaInsight.md +40 -0
- eval_studio_client/api/docs/V1alphaLeaderboard.md +54 -0
- eval_studio_client/api/docs/V1alphaLeaderboardStatus.md +12 -0
- eval_studio_client/api/docs/V1alphaLeaderboardType.md +12 -0
- eval_studio_client/api/docs/V1alphaLeaderboardView.md +12 -0
- eval_studio_client/api/docs/V1alphaListBaseModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListDashboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListDocumentsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListEvaluatorsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListLLMModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListLeaderboardsResponse.md +30 -0
- eval_studio_client/api/docs/V1alphaListModelCollectionsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListMostRecentDashboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListMostRecentLeaderboardsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListMostRecentModelsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListMostRecentTestsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListOperationsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListPerturbatorsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListRAGCollectionsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListTestCasesResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListTestClassesResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaListTestsResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaModel.md +42 -0
- eval_studio_client/api/docs/V1alphaModelType.md +12 -0
- eval_studio_client/api/docs/V1alphaOperation.md +40 -0
- eval_studio_client/api/docs/V1alphaOperationProgress.md +32 -0
- eval_studio_client/api/docs/V1alphaPerturbTestResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaPerturbator.md +39 -0
- eval_studio_client/api/docs/V1alphaPerturbatorConfiguration.md +32 -0
- eval_studio_client/api/docs/V1alphaPerturbatorIntensity.md +11 -0
- eval_studio_client/api/docs/V1alphaProblemAndAction.md +39 -0
- eval_studio_client/api/docs/V1alphaTest.md +40 -0
- eval_studio_client/api/docs/V1alphaTestCase.md +40 -0
- eval_studio_client/api/docs/V1alphaTestCaseRelationship.md +31 -0
- eval_studio_client/api/docs/V1alphaTestClass.md +41 -0
- eval_studio_client/api/docs/V1alphaTestClassType.md +12 -0
- eval_studio_client/api/docs/V1alphaTestLab.md +41 -0
- eval_studio_client/api/docs/V1alphaUpdateDashboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateDocumentResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateLeaderboardResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateModelResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateOperationResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateTestCaseResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaUpdateTestResponse.md +29 -0
- eval_studio_client/api/docs/V1alphaWhoAmIResponse.md +31 -0
- eval_studio_client/api/docs/WhoAmIServiceApi.md +72 -0
- eval_studio_client/api/exceptions.py +199 -0
- eval_studio_client/api/models/__init__.py +148 -0
- eval_studio_client/api/models/perturbation_service_create_perturbation_request.py +115 -0
- eval_studio_client/api/models/protobuf_any.py +100 -0
- eval_studio_client/api/models/required_the_dashboard_to_update.py +127 -0
- eval_studio_client/api/models/required_the_document_to_update.py +116 -0
- eval_studio_client/api/models/required_the_leaderboard_to_update.py +178 -0
- eval_studio_client/api/models/required_the_model_to_update.py +127 -0
- eval_studio_client/api/models/required_the_operation_to_finalize.py +129 -0
- eval_studio_client/api/models/required_the_operation_to_update.py +129 -0
- eval_studio_client/api/models/required_the_test_case_to_update.py +120 -0
- eval_studio_client/api/models/required_the_test_to_update.py +122 -0
- eval_studio_client/api/models/rpc_status.py +99 -0
- eval_studio_client/api/models/test_case_service_batch_delete_test_cases_request.py +87 -0
- eval_studio_client/api/models/test_service_perturb_test_request.py +99 -0
- eval_studio_client/api/models/v1alpha_batch_create_leaderboards_request.py +99 -0
- eval_studio_client/api/models/v1alpha_batch_create_leaderboards_response.py +91 -0
- eval_studio_client/api/models/v1alpha_batch_delete_dashboards_request.py +87 -0
- eval_studio_client/api/models/v1alpha_batch_delete_dashboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_documents_request.py +87 -0
- eval_studio_client/api/models/v1alpha_batch_delete_documents_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_evaluators_request.py +87 -0
- eval_studio_client/api/models/v1alpha_batch_delete_evaluators_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_leaderboards_request.py +90 -0
- eval_studio_client/api/models/v1alpha_batch_delete_leaderboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_models_request.py +87 -0
- eval_studio_client/api/models/v1alpha_batch_delete_models_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_test_cases_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_delete_tests_request.py +89 -0
- eval_studio_client/api/models/v1alpha_batch_delete_tests_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_dashboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_documents_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_leaderboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_models_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_operations_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_get_tests_response.py +95 -0
- eval_studio_client/api/models/v1alpha_batch_import_leaderboard_request.py +104 -0
- eval_studio_client/api/models/v1alpha_batch_import_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_batch_import_tests_request.py +93 -0
- eval_studio_client/api/models/v1alpha_batch_import_tests_response.py +95 -0
- eval_studio_client/api/models/v1alpha_check_base_models_response.py +89 -0
- eval_studio_client/api/models/v1alpha_collection_info.py +93 -0
- eval_studio_client/api/models/v1alpha_create_dashboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_document_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_evaluation_request.py +115 -0
- eval_studio_client/api/models/v1alpha_create_evaluator_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_leaderboard_request.py +91 -0
- eval_studio_client/api/models/v1alpha_create_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_leaderboard_without_cache_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_model_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_perturbation_response.py +87 -0
- eval_studio_client/api/models/v1alpha_create_test_case_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_test_lab_response.py +91 -0
- eval_studio_client/api/models/v1alpha_create_test_response.py +91 -0
- eval_studio_client/api/models/v1alpha_dashboard.py +131 -0
- eval_studio_client/api/models/v1alpha_dashboard_status.py +39 -0
- eval_studio_client/api/models/v1alpha_delete_dashboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_document_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_evaluator_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_model_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_test_case_response.py +91 -0
- eval_studio_client/api/models/v1alpha_delete_test_response.py +91 -0
- eval_studio_client/api/models/v1alpha_document.py +120 -0
- eval_studio_client/api/models/v1alpha_evaluation_test.py +107 -0
- eval_studio_client/api/models/v1alpha_evaluator.py +155 -0
- eval_studio_client/api/models/v1alpha_evaluator_param_type.py +42 -0
- eval_studio_client/api/models/v1alpha_evaluator_parameter.py +126 -0
- eval_studio_client/api/models/v1alpha_evaluator_view.py +38 -0
- eval_studio_client/api/models/v1alpha_finalize_operation_response.py +91 -0
- eval_studio_client/api/models/v1alpha_find_all_test_cases_by_id_response.py +95 -0
- eval_studio_client/api/models/v1alpha_find_test_lab_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_dashboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_document_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_evaluator_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_info_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_model_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_operation_progress_by_parent_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_operation_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_perturbator_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_test_case_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_test_class_response.py +91 -0
- eval_studio_client/api/models/v1alpha_get_test_response.py +91 -0
- eval_studio_client/api/models/v1alpha_import_evaluation_request.py +99 -0
- eval_studio_client/api/models/v1alpha_import_leaderboard_request.py +104 -0
- eval_studio_client/api/models/v1alpha_import_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_info.py +99 -0
- eval_studio_client/api/models/v1alpha_insight.py +107 -0
- eval_studio_client/api/models/v1alpha_leaderboard.py +182 -0
- eval_studio_client/api/models/v1alpha_leaderboard_status.py +39 -0
- eval_studio_client/api/models/v1alpha_leaderboard_type.py +39 -0
- eval_studio_client/api/models/v1alpha_leaderboard_view.py +39 -0
- eval_studio_client/api/models/v1alpha_list_base_models_response.py +87 -0
- eval_studio_client/api/models/v1alpha_list_dashboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_documents_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_evaluators_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_leaderboards_response.py +97 -0
- eval_studio_client/api/models/v1alpha_list_llm_models_response.py +87 -0
- eval_studio_client/api/models/v1alpha_list_model_collections_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_models_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_most_recent_dashboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_most_recent_leaderboards_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_most_recent_models_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_most_recent_tests_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_operations_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_perturbators_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_rag_collections_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_test_cases_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_test_classes_response.py +95 -0
- eval_studio_client/api/models/v1alpha_list_tests_response.py +95 -0
- eval_studio_client/api/models/v1alpha_model.py +131 -0
- eval_studio_client/api/models/v1alpha_model_type.py +46 -0
- eval_studio_client/api/models/v1alpha_operation.py +133 -0
- eval_studio_client/api/models/v1alpha_operation_progress.py +99 -0
- eval_studio_client/api/models/v1alpha_perturb_test_response.py +91 -0
- eval_studio_client/api/models/v1alpha_perturbator.py +122 -0
- eval_studio_client/api/models/v1alpha_perturbator_configuration.py +92 -0
- eval_studio_client/api/models/v1alpha_perturbator_intensity.py +39 -0
- eval_studio_client/api/models/v1alpha_problem_and_action.py +129 -0
- eval_studio_client/api/models/v1alpha_test.py +126 -0
- eval_studio_client/api/models/v1alpha_test_case.py +124 -0
- eval_studio_client/api/models/v1alpha_test_case_relationship.py +91 -0
- eval_studio_client/api/models/v1alpha_test_class.py +127 -0
- eval_studio_client/api/models/v1alpha_test_class_type.py +42 -0
- eval_studio_client/api/models/v1alpha_test_lab.py +137 -0
- eval_studio_client/api/models/v1alpha_update_dashboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_document_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_leaderboard_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_model_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_operation_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_test_case_response.py +91 -0
- eval_studio_client/api/models/v1alpha_update_test_response.py +91 -0
- eval_studio_client/api/models/v1alpha_who_am_i_response.py +91 -0
- eval_studio_client/api/rest.py +257 -0
- eval_studio_client/api/test/__init__.py +0 -0
- eval_studio_client/api/test/test_dashboard_service_api.py +79 -0
- eval_studio_client/api/test/test_document_service_api.py +73 -0
- eval_studio_client/api/test/test_evaluation_service_api.py +55 -0
- eval_studio_client/api/test/test_evaluator_service_api.py +61 -0
- eval_studio_client/api/test/test_info_service_api.py +37 -0
- eval_studio_client/api/test/test_leaderboard_service_api.py +103 -0
- eval_studio_client/api/test/test_model_service_api.py +97 -0
- eval_studio_client/api/test/test_operation_progress_service_api.py +37 -0
- eval_studio_client/api/test/test_operation_service_api.py +61 -0
- eval_studio_client/api/test/test_perturbation_service_api.py +37 -0
- eval_studio_client/api/test/test_perturbation_service_create_perturbation_request.py +79 -0
- eval_studio_client/api/test/test_perturbator_service_api.py +43 -0
- eval_studio_client/api/test/test_protobuf_any.py +51 -0
- eval_studio_client/api/test/test_required_the_dashboard_to_update.py +64 -0
- eval_studio_client/api/test/test_required_the_document_to_update.py +59 -0
- eval_studio_client/api/test/test_required_the_leaderboard_to_update.py +115 -0
- eval_studio_client/api/test/test_required_the_model_to_update.py +63 -0
- eval_studio_client/api/test/test_required_the_operation_to_finalize.py +71 -0
- eval_studio_client/api/test/test_required_the_operation_to_update.py +71 -0
- eval_studio_client/api/test/test_required_the_test_case_to_update.py +63 -0
- eval_studio_client/api/test/test_required_the_test_to_update.py +65 -0
- eval_studio_client/api/test/test_rpc_status.py +57 -0
- eval_studio_client/api/test/test_test_case_service_api.py +73 -0
- eval_studio_client/api/test/test_test_case_service_batch_delete_test_cases_request.py +53 -0
- eval_studio_client/api/test/test_test_class_service_api.py +43 -0
- eval_studio_client/api/test/test_test_lab_service_api.py +43 -0
- eval_studio_client/api/test/test_test_service_api.py +91 -0
- eval_studio_client/api/test/test_test_service_perturb_test_request.py +58 -0
- eval_studio_client/api/test/test_v1alpha_batch_create_leaderboards_request.py +119 -0
- eval_studio_client/api/test/test_v1alpha_batch_create_leaderboards_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_dashboards_request.py +53 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_dashboards_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_documents_request.py +53 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_documents_response.py +63 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_evaluators_request.py +53 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_evaluators_response.py +91 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_leaderboards_request.py +54 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_leaderboards_response.py +116 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_models_request.py +53 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_models_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_test_cases_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_tests_request.py +54 -0
- eval_studio_client/api/test/test_v1alpha_batch_delete_tests_response.py +69 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_dashboards_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_documents_response.py +63 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_leaderboards_response.py +116 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_models_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_operations_response.py +73 -0
- eval_studio_client/api/test/test_v1alpha_batch_get_tests_response.py +69 -0
- eval_studio_client/api/test/test_v1alpha_batch_import_leaderboard_request.py +61 -0
- eval_studio_client/api/test/test_v1alpha_batch_import_leaderboard_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_batch_import_tests_request.py +54 -0
- eval_studio_client/api/test/test_v1alpha_batch_import_tests_response.py +69 -0
- eval_studio_client/api/test/test_v1alpha_check_base_models_response.py +52 -0
- eval_studio_client/api/test/test_v1alpha_collection_info.py +54 -0
- eval_studio_client/api/test/test_v1alpha_create_dashboard_response.py +66 -0
- eval_studio_client/api/test/test_v1alpha_create_document_response.py +61 -0
- eval_studio_client/api/test/test_v1alpha_create_evaluation_request.py +107 -0
- eval_studio_client/api/test/test_v1alpha_create_evaluator_response.py +89 -0
- eval_studio_client/api/test/test_v1alpha_create_leaderboard_request.py +114 -0
- eval_studio_client/api/test/test_v1alpha_create_leaderboard_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_create_leaderboard_without_cache_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_create_model_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_create_perturbation_response.py +51 -0
- eval_studio_client/api/test/test_v1alpha_create_test_case_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_create_test_lab_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_create_test_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_dashboard.py +65 -0
- eval_studio_client/api/test/test_v1alpha_dashboard_status.py +33 -0
- eval_studio_client/api/test/test_v1alpha_delete_dashboard_response.py +66 -0
- eval_studio_client/api/test/test_v1alpha_delete_document_response.py +61 -0
- eval_studio_client/api/test/test_v1alpha_delete_evaluator_response.py +89 -0
- eval_studio_client/api/test/test_v1alpha_delete_leaderboard_response.py +114 -0
- eval_studio_client/api/test/test_v1alpha_delete_model_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_delete_test_case_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_delete_test_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_document.py +60 -0
- eval_studio_client/api/test/test_v1alpha_evaluation_test.py +76 -0
- eval_studio_client/api/test/test_v1alpha_evaluator.py +91 -0
- eval_studio_client/api/test/test_v1alpha_evaluator_param_type.py +33 -0
- eval_studio_client/api/test/test_v1alpha_evaluator_parameter.py +68 -0
- eval_studio_client/api/test/test_v1alpha_evaluator_view.py +33 -0
- eval_studio_client/api/test/test_v1alpha_finalize_operation_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_find_all_test_cases_by_id_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_find_test_lab_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_get_dashboard_response.py +66 -0
- eval_studio_client/api/test/test_v1alpha_get_document_response.py +61 -0
- eval_studio_client/api/test/test_v1alpha_get_evaluator_response.py +89 -0
- eval_studio_client/api/test/test_v1alpha_get_info_response.py +60 -0
- eval_studio_client/api/test/test_v1alpha_get_leaderboard_response.py +114 -0
- eval_studio_client/api/test/test_v1alpha_get_model_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_get_operation_progress_by_parent_response.py +55 -0
- eval_studio_client/api/test/test_v1alpha_get_operation_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_get_perturbator_response.py +64 -0
- eval_studio_client/api/test/test_v1alpha_get_test_case_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_get_test_class_response.py +70 -0
- eval_studio_client/api/test/test_v1alpha_get_test_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_import_evaluation_request.py +73 -0
- eval_studio_client/api/test/test_v1alpha_import_leaderboard_request.py +59 -0
- eval_studio_client/api/test/test_v1alpha_import_leaderboard_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_info.py +59 -0
- eval_studio_client/api/test/test_v1alpha_insight.py +67 -0
- eval_studio_client/api/test/test_v1alpha_leaderboard.py +116 -0
- eval_studio_client/api/test/test_v1alpha_leaderboard_status.py +33 -0
- eval_studio_client/api/test/test_v1alpha_leaderboard_type.py +33 -0
- eval_studio_client/api/test/test_v1alpha_leaderboard_view.py +33 -0
- eval_studio_client/api/test/test_v1alpha_list_base_models_response.py +53 -0
- eval_studio_client/api/test/test_v1alpha_list_dashboards_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_list_documents_response.py +63 -0
- eval_studio_client/api/test/test_v1alpha_list_evaluators_response.py +91 -0
- eval_studio_client/api/test/test_v1alpha_list_leaderboards_response.py +117 -0
- eval_studio_client/api/test/test_v1alpha_list_llm_models_response.py +53 -0
- eval_studio_client/api/test/test_v1alpha_list_model_collections_response.py +57 -0
- eval_studio_client/api/test/test_v1alpha_list_models_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_list_most_recent_dashboards_response.py +68 -0
- eval_studio_client/api/test/test_v1alpha_list_most_recent_leaderboards_response.py +116 -0
- eval_studio_client/api/test/test_v1alpha_list_most_recent_models_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_list_most_recent_tests_response.py +69 -0
- eval_studio_client/api/test/test_v1alpha_list_operations_response.py +73 -0
- eval_studio_client/api/test/test_v1alpha_list_perturbators_response.py +66 -0
- eval_studio_client/api/test/test_v1alpha_list_rag_collections_response.py +57 -0
- eval_studio_client/api/test/test_v1alpha_list_test_cases_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_list_test_classes_response.py +72 -0
- eval_studio_client/api/test/test_v1alpha_list_tests_response.py +69 -0
- eval_studio_client/api/test/test_v1alpha_model.py +64 -0
- eval_studio_client/api/test/test_v1alpha_model_type.py +33 -0
- eval_studio_client/api/test/test_v1alpha_operation.py +72 -0
- eval_studio_client/api/test/test_v1alpha_operation_progress.py +54 -0
- eval_studio_client/api/test/test_v1alpha_perturb_test_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_perturbator.py +63 -0
- eval_studio_client/api/test/test_v1alpha_perturbator_configuration.py +53 -0
- eval_studio_client/api/test/test_v1alpha_perturbator_intensity.py +33 -0
- eval_studio_client/api/test/test_v1alpha_problem_and_action.py +65 -0
- eval_studio_client/api/test/test_v1alpha_test.py +66 -0
- eval_studio_client/api/test/test_v1alpha_test_case.py +64 -0
- eval_studio_client/api/test/test_v1alpha_test_case_relationship.py +53 -0
- eval_studio_client/api/test/test_v1alpha_test_class.py +69 -0
- eval_studio_client/api/test/test_v1alpha_test_class_type.py +33 -0
- eval_studio_client/api/test/test_v1alpha_test_lab.py +67 -0
- eval_studio_client/api/test/test_v1alpha_update_dashboard_response.py +66 -0
- eval_studio_client/api/test/test_v1alpha_update_document_response.py +61 -0
- eval_studio_client/api/test/test_v1alpha_update_leaderboard_response.py +114 -0
- eval_studio_client/api/test/test_v1alpha_update_model_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_update_operation_response.py +71 -0
- eval_studio_client/api/test/test_v1alpha_update_test_case_response.py +65 -0
- eval_studio_client/api/test/test_v1alpha_update_test_response.py +67 -0
- eval_studio_client/api/test/test_v1alpha_who_am_i_response.py +53 -0
- eval_studio_client/api/test/test_who_am_i_service_api.py +38 -0
- eval_studio_client/client.py +98 -0
- eval_studio_client/dashboards.py +187 -0
- eval_studio_client/documents.py +95 -0
- eval_studio_client/evaluators.py +65 -0
- eval_studio_client/gen/openapiv2/eval_studio.swagger.json +6043 -0
- eval_studio_client/insights.py +35 -0
- eval_studio_client/leaderboards.py +207 -0
- eval_studio_client/models.py +522 -0
- eval_studio_client/perturbators.py +101 -0
- eval_studio_client/problems.py +50 -0
- eval_studio_client/test_labs.py +319 -0
- eval_studio_client/tests.py +369 -0
- eval_studio_client-0.7.0.dist-info/METADATA +18 -0
- eval_studio_client-0.7.0.dist-info/RECORD +470 -0
- eval_studio_client-0.7.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1alpha/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, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from eval_studio_client.api.models.protobuf_any import ProtobufAny
|
|
24
|
+
from eval_studio_client.api.models.rpc_status import RpcStatus
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class RequiredTheOperationToFinalize(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
The Operation's `name` field is used to identify the Operation to finalize. Format: operations/{operation}
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
create_time: Optional[datetime] = Field(default=None, description="Output only. Timestamp when the Operation was created.", alias="createTime")
|
|
33
|
+
creator: Optional[StrictStr] = Field(default=None, description="Output only. Name of the user or service that requested creation of the Operation.")
|
|
34
|
+
update_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Timestamp when the Operation was last updated.", alias="updateTime")
|
|
35
|
+
updater: Optional[StrictStr] = Field(default=None, description="Output only. Optional. Name of the user or service that requested update of the Operation.")
|
|
36
|
+
delete_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Set when the Operation is deleted. When set Operation should be considered as deleted.", alias="deleteTime")
|
|
37
|
+
deleter: Optional[StrictStr] = Field(default=None, description="Output only. Optional. Name of the user or service that requested deletion of the Operation.")
|
|
38
|
+
metadata: Optional[ProtobufAny] = None
|
|
39
|
+
done: Optional[StrictBool] = Field(default=None, description="If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.")
|
|
40
|
+
error: Optional[RpcStatus] = None
|
|
41
|
+
response: Optional[ProtobufAny] = None
|
|
42
|
+
__properties: ClassVar[List[str]] = ["createTime", "creator", "updateTime", "updater", "deleteTime", "deleter", "metadata", "done", "error", "response"]
|
|
43
|
+
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
+
"""Create an instance of RequiredTheOperationToFinalize from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
75
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
76
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
77
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
79
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
"create_time",
|
|
83
|
+
"creator",
|
|
84
|
+
"update_time",
|
|
85
|
+
"updater",
|
|
86
|
+
"delete_time",
|
|
87
|
+
"deleter",
|
|
88
|
+
])
|
|
89
|
+
|
|
90
|
+
_dict = self.model_dump(
|
|
91
|
+
by_alias=True,
|
|
92
|
+
exclude=excluded_fields,
|
|
93
|
+
exclude_none=True,
|
|
94
|
+
)
|
|
95
|
+
# override the default output from pydantic by calling `to_dict()` of metadata
|
|
96
|
+
if self.metadata:
|
|
97
|
+
_dict['metadata'] = self.metadata.to_dict()
|
|
98
|
+
# override the default output from pydantic by calling `to_dict()` of error
|
|
99
|
+
if self.error:
|
|
100
|
+
_dict['error'] = self.error.to_dict()
|
|
101
|
+
# override the default output from pydantic by calling `to_dict()` of response
|
|
102
|
+
if self.response:
|
|
103
|
+
_dict['response'] = self.response.to_dict()
|
|
104
|
+
return _dict
|
|
105
|
+
|
|
106
|
+
@classmethod
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
108
|
+
"""Create an instance of RequiredTheOperationToFinalize from a dict"""
|
|
109
|
+
if obj is None:
|
|
110
|
+
return None
|
|
111
|
+
|
|
112
|
+
if not isinstance(obj, dict):
|
|
113
|
+
return cls.model_validate(obj)
|
|
114
|
+
|
|
115
|
+
_obj = cls.model_validate({
|
|
116
|
+
"createTime": obj.get("createTime"),
|
|
117
|
+
"creator": obj.get("creator"),
|
|
118
|
+
"updateTime": obj.get("updateTime"),
|
|
119
|
+
"updater": obj.get("updater"),
|
|
120
|
+
"deleteTime": obj.get("deleteTime"),
|
|
121
|
+
"deleter": obj.get("deleter"),
|
|
122
|
+
"metadata": ProtobufAny.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None,
|
|
123
|
+
"done": obj.get("done"),
|
|
124
|
+
"error": RpcStatus.from_dict(obj["error"]) if obj.get("error") is not None else None,
|
|
125
|
+
"response": ProtobufAny.from_dict(obj["response"]) if obj.get("response") is not None else None
|
|
126
|
+
})
|
|
127
|
+
return _obj
|
|
128
|
+
|
|
129
|
+
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1alpha/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, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from eval_studio_client.api.models.protobuf_any import ProtobufAny
|
|
24
|
+
from eval_studio_client.api.models.rpc_status import RpcStatus
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class RequiredTheOperationToUpdate(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
The Operation's `name` field is used to identify the Operation to update. Format: operations/{operation}
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
create_time: Optional[datetime] = Field(default=None, description="Output only. Timestamp when the Operation was created.", alias="createTime")
|
|
33
|
+
creator: Optional[StrictStr] = Field(default=None, description="Output only. Name of the user or service that requested creation of the Operation.")
|
|
34
|
+
update_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Timestamp when the Operation was last updated.", alias="updateTime")
|
|
35
|
+
updater: Optional[StrictStr] = Field(default=None, description="Output only. Optional. Name of the user or service that requested update of the Operation.")
|
|
36
|
+
delete_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Set when the Operation is deleted. When set Operation should be considered as deleted.", alias="deleteTime")
|
|
37
|
+
deleter: Optional[StrictStr] = Field(default=None, description="Output only. Optional. Name of the user or service that requested deletion of the Operation.")
|
|
38
|
+
metadata: Optional[ProtobufAny] = None
|
|
39
|
+
done: Optional[StrictBool] = Field(default=None, description="If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.")
|
|
40
|
+
error: Optional[RpcStatus] = None
|
|
41
|
+
response: Optional[ProtobufAny] = None
|
|
42
|
+
__properties: ClassVar[List[str]] = ["createTime", "creator", "updateTime", "updater", "deleteTime", "deleter", "metadata", "done", "error", "response"]
|
|
43
|
+
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
+
"""Create an instance of RequiredTheOperationToUpdate from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
75
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
76
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
77
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
79
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
"create_time",
|
|
83
|
+
"creator",
|
|
84
|
+
"update_time",
|
|
85
|
+
"updater",
|
|
86
|
+
"delete_time",
|
|
87
|
+
"deleter",
|
|
88
|
+
])
|
|
89
|
+
|
|
90
|
+
_dict = self.model_dump(
|
|
91
|
+
by_alias=True,
|
|
92
|
+
exclude=excluded_fields,
|
|
93
|
+
exclude_none=True,
|
|
94
|
+
)
|
|
95
|
+
# override the default output from pydantic by calling `to_dict()` of metadata
|
|
96
|
+
if self.metadata:
|
|
97
|
+
_dict['metadata'] = self.metadata.to_dict()
|
|
98
|
+
# override the default output from pydantic by calling `to_dict()` of error
|
|
99
|
+
if self.error:
|
|
100
|
+
_dict['error'] = self.error.to_dict()
|
|
101
|
+
# override the default output from pydantic by calling `to_dict()` of response
|
|
102
|
+
if self.response:
|
|
103
|
+
_dict['response'] = self.response.to_dict()
|
|
104
|
+
return _dict
|
|
105
|
+
|
|
106
|
+
@classmethod
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
108
|
+
"""Create an instance of RequiredTheOperationToUpdate from a dict"""
|
|
109
|
+
if obj is None:
|
|
110
|
+
return None
|
|
111
|
+
|
|
112
|
+
if not isinstance(obj, dict):
|
|
113
|
+
return cls.model_validate(obj)
|
|
114
|
+
|
|
115
|
+
_obj = cls.model_validate({
|
|
116
|
+
"createTime": obj.get("createTime"),
|
|
117
|
+
"creator": obj.get("creator"),
|
|
118
|
+
"updateTime": obj.get("updateTime"),
|
|
119
|
+
"updater": obj.get("updater"),
|
|
120
|
+
"deleteTime": obj.get("deleteTime"),
|
|
121
|
+
"deleter": obj.get("deleter"),
|
|
122
|
+
"metadata": ProtobufAny.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None,
|
|
123
|
+
"done": obj.get("done"),
|
|
124
|
+
"error": RpcStatus.from_dict(obj["error"]) if obj.get("error") is not None else None,
|
|
125
|
+
"response": ProtobufAny.from_dict(obj["response"]) if obj.get("response") is not None else None
|
|
126
|
+
})
|
|
127
|
+
return _obj
|
|
128
|
+
|
|
129
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1alpha/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 typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RequiredTheTestCaseToUpdate(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
RequiredTheTestCaseToUpdate
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
create_time: Optional[datetime] = Field(default=None, description="Output only. Timestamp when the Test was created.", alias="createTime")
|
|
31
|
+
creator: Optional[StrictStr] = Field(default=None, description="Output only. Name of the user or service that requested creation of the TestCase.")
|
|
32
|
+
update_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Timestamp when the TestCase was last updated.", alias="updateTime")
|
|
33
|
+
updater: Optional[StrictStr] = Field(default=None, description="Output only. Optional. Name of the user or service that requested update of the TestCase.")
|
|
34
|
+
delete_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Set when the TestCase is deleted. When set TestCase should be considered as deleted.", alias="deleteTime")
|
|
35
|
+
deleter: Optional[StrictStr] = Field(default=None, description="Output only. Optional. Name of the user or service that requested deletion of the TestCase.")
|
|
36
|
+
parent: Optional[StrictStr] = Field(default=None, description="Parent Test resource name. e.g.: \"tests/<UUID>\".")
|
|
37
|
+
prompt: Optional[StrictStr] = Field(default=None, description="Prompt text. Model input.")
|
|
38
|
+
answer: Optional[StrictStr] = Field(default=None, description="Expected answer text. Model output.")
|
|
39
|
+
constraints: Optional[List[StrictStr]] = Field(default=None, description="Constraints on the model output.")
|
|
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"]
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
validate_assignment=True,
|
|
46
|
+
protected_namespaces=(),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
+
"""Create an instance of RequiredTheTestCaseToUpdate from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
74
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
75
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
76
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
77
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
79
|
+
"""
|
|
80
|
+
excluded_fields: Set[str] = set([
|
|
81
|
+
"create_time",
|
|
82
|
+
"creator",
|
|
83
|
+
"update_time",
|
|
84
|
+
"updater",
|
|
85
|
+
"delete_time",
|
|
86
|
+
"deleter",
|
|
87
|
+
])
|
|
88
|
+
|
|
89
|
+
_dict = self.model_dump(
|
|
90
|
+
by_alias=True,
|
|
91
|
+
exclude=excluded_fields,
|
|
92
|
+
exclude_none=True,
|
|
93
|
+
)
|
|
94
|
+
return _dict
|
|
95
|
+
|
|
96
|
+
@classmethod
|
|
97
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
98
|
+
"""Create an instance of RequiredTheTestCaseToUpdate from a dict"""
|
|
99
|
+
if obj is None:
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
if not isinstance(obj, dict):
|
|
103
|
+
return cls.model_validate(obj)
|
|
104
|
+
|
|
105
|
+
_obj = cls.model_validate({
|
|
106
|
+
"createTime": obj.get("createTime"),
|
|
107
|
+
"creator": obj.get("creator"),
|
|
108
|
+
"updateTime": obj.get("updateTime"),
|
|
109
|
+
"updater": obj.get("updater"),
|
|
110
|
+
"deleteTime": obj.get("deleteTime"),
|
|
111
|
+
"deleter": obj.get("deleter"),
|
|
112
|
+
"parent": obj.get("parent"),
|
|
113
|
+
"prompt": obj.get("prompt"),
|
|
114
|
+
"answer": obj.get("answer"),
|
|
115
|
+
"constraints": obj.get("constraints"),
|
|
116
|
+
"condition": obj.get("condition")
|
|
117
|
+
})
|
|
118
|
+
return _obj
|
|
119
|
+
|
|
120
|
+
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1alpha/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, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RequiredTheTestToUpdate(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
RequiredTheTestToUpdate
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
create_time: Optional[datetime] = Field(default=None, description="Output only. Timestamp when the Test was created.", alias="createTime")
|
|
31
|
+
creator: Optional[StrictStr] = Field(default=None, description="Output only. Name of the user or service that requested creation of the Test.")
|
|
32
|
+
update_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Timestamp when the Test was last updated.", alias="updateTime")
|
|
33
|
+
updater: Optional[StrictStr] = Field(default=None, description="Output only. Optional. Name of the user or service that requested update of the Test.")
|
|
34
|
+
delete_time: Optional[datetime] = Field(default=None, description="Output only. Optional. Set when the Test is deleted. When set, Test should be considered as deleted.", alias="deleteTime")
|
|
35
|
+
deleter: Optional[StrictStr] = Field(default=None, description="Output only. Optional. Name of the user or service that requested deletion of the Test.")
|
|
36
|
+
display_name: Optional[StrictStr] = Field(default=None, description="Human readable name of the Test.", alias="displayName")
|
|
37
|
+
description: Optional[StrictStr] = Field(default=None, description="Optional. Arbitrary description of the Test.")
|
|
38
|
+
documents: Optional[List[StrictStr]] = Field(default=None, description="Immutable. Resource names of Documents assigned to the Test.")
|
|
39
|
+
tags: Optional[List[StrictStr]] = Field(default=None, description="Tags assigned to the Test.")
|
|
40
|
+
demo: Optional[StrictBool] = Field(default=None, description="Output only. Whether the Test is a demo resource or not. Demo resources are read only.")
|
|
41
|
+
__properties: ClassVar[List[str]] = ["createTime", "creator", "updateTime", "updater", "deleteTime", "deleter", "displayName", "description", "documents", "tags", "demo"]
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
validate_assignment=True,
|
|
46
|
+
protected_namespaces=(),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
+
"""Create an instance of RequiredTheTestToUpdate from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
74
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
75
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
76
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
77
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
79
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
"create_time",
|
|
83
|
+
"creator",
|
|
84
|
+
"update_time",
|
|
85
|
+
"updater",
|
|
86
|
+
"delete_time",
|
|
87
|
+
"deleter",
|
|
88
|
+
"demo",
|
|
89
|
+
])
|
|
90
|
+
|
|
91
|
+
_dict = self.model_dump(
|
|
92
|
+
by_alias=True,
|
|
93
|
+
exclude=excluded_fields,
|
|
94
|
+
exclude_none=True,
|
|
95
|
+
)
|
|
96
|
+
return _dict
|
|
97
|
+
|
|
98
|
+
@classmethod
|
|
99
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
100
|
+
"""Create an instance of RequiredTheTestToUpdate from a dict"""
|
|
101
|
+
if obj is None:
|
|
102
|
+
return None
|
|
103
|
+
|
|
104
|
+
if not isinstance(obj, dict):
|
|
105
|
+
return cls.model_validate(obj)
|
|
106
|
+
|
|
107
|
+
_obj = cls.model_validate({
|
|
108
|
+
"createTime": obj.get("createTime"),
|
|
109
|
+
"creator": obj.get("creator"),
|
|
110
|
+
"updateTime": obj.get("updateTime"),
|
|
111
|
+
"updater": obj.get("updater"),
|
|
112
|
+
"deleteTime": obj.get("deleteTime"),
|
|
113
|
+
"deleter": obj.get("deleter"),
|
|
114
|
+
"displayName": obj.get("displayName"),
|
|
115
|
+
"description": obj.get("description"),
|
|
116
|
+
"documents": obj.get("documents"),
|
|
117
|
+
"tags": obj.get("tags"),
|
|
118
|
+
"demo": obj.get("demo")
|
|
119
|
+
})
|
|
120
|
+
return _obj
|
|
121
|
+
|
|
122
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ai/h2o/eval_studio/v1alpha/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 eval_studio_client.api.models.protobuf_any import ProtobufAny
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RpcStatus(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
code: Optional[StrictInt] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].")
|
|
31
|
+
message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.")
|
|
32
|
+
details: Optional[List[ProtobufAny]] = Field(default=None, description="A list of messages that carry the error details. There is a common set of message types for APIs to use.")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["code", "message", "details"]
|
|
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 RpcStatus 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
|
+
# override the default output from pydantic by calling `to_dict()` of each item in details (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.details:
|
|
77
|
+
for _item in self.details:
|
|
78
|
+
if _item:
|
|
79
|
+
_items.append(_item.to_dict())
|
|
80
|
+
_dict['details'] = _items
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of RpcStatus from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"code": obj.get("code"),
|
|
94
|
+
"message": obj.get("message"),
|
|
95
|
+
"details": [ProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|