@@ -745,19 +745,16 @@ def create_offline_model_evaluation_project(
745
745
Returns:
746
746
Project: The created project
747
747
"""
748
- media_type = MediaType .Conversational
749
- editor_task_type = EditorTaskType .OfflineModelChatEvaluation
750
-
751
748
input = {
752
749
"name" : name ,
753
750
"description" : description ,
754
- "media_type" : media_type ,
751
+ "media_type" : MediaType . Conversational ,
755
752
"auto_audit_percentage" : auto_audit_percentage ,
756
753
"auto_audit_number_of_labels" : auto_audit_number_of_labels ,
757
754
"quality_modes" : quality_modes ,
758
755
"is_benchmark_enabled" : is_benchmark_enabled ,
759
756
"is_consensus_enabled" : is_consensus_enabled ,
760
- "editor_task_type" : editor_task_type ,
757
+ "editor_task_type" : EditorTaskType . OfflineModelChatEvaluation ,
761
758
}
762
759
return self ._create_project (_CoreProjectInput (** input ))
763
760
@@ -845,25 +842,38 @@ def create_prompt_response_generation_project(
845
842
}
846
843
return self ._create_project (_CoreProjectInput (** input ))
847
844
848
- def create_response_creation_project (self , ** kwargs ) -> Project :
845
+ def create_response_creation_project (
846
+ self ,
847
+ name : str ,
848
+ description : Optional [str ] = None ,
849
+ auto_audit_percentage : Optional [float ] = None ,
850
+ auto_audit_number_of_labels : Optional [int ] = None ,
851
+ quality_modes : Optional [Set [QualityMode ]] = {
852
+ QualityMode .Benchmark ,
853
+ QualityMode .Consensus ,
854
+ },
855
+ is_benchmark_enabled : Optional [bool ] = None ,
856
+ is_consensus_enabled : Optional [bool ] = None ,
857
+ ) -> Project :
849
858
"""
850
859
Creates a project for response creation.
851
860
Args:
852
861
**kwargs: Additional parameters to pass see the create_project method
853
862
Returns:
854
863
Project: The created project
855
864
"""
856
- kwargs ["media_type" ] = MediaType .Text # Only Text is supported
857
- kwargs ["editor_task_type" ] = (
858
- EditorTaskType .ResponseCreation .value
859
- ) # Special editor task type for response creation projects
860
-
861
- # The following arguments are not supported for response creation projects
862
- kwargs .pop ("dataset_name_or_id" , None )
863
- kwargs .pop ("append_to_existing_dataset" , None )
864
- kwargs .pop ("data_row_count" , None )
865
-
866
- return self ._create_project (_CoreProjectInput (** kwargs ))
865
+ input = {
866
+ "name" : name ,
867
+ "description" : description ,
868
+ "media_type" : MediaType .Text , # Only Text is supported
869
+ "auto_audit_percentage" : auto_audit_percentage ,
870
+ "auto_audit_number_of_labels" : auto_audit_number_of_labels ,
871
+ "quality_modes" : quality_modes ,
872
+ "is_benchmark_enabled" : is_benchmark_enabled ,
873
+ "is_consensus_enabled" : is_consensus_enabled ,
874
+ "editor_task_type" : EditorTaskType .ResponseCreation .value , # Special editor task type for response creation projects
875
+ }
876
+ return self ._create_project (_CoreProjectInput (** input ))
867
877
868
878
def _create_project (self , input : _CoreProjectInput ) -> Project :
869
879
media_type_value = input .media_type .value
0 commit comments