@@ -763,10 +763,20 @@ def create_offline_model_evaluation_project(
763
763
764
764
def create_prompt_response_generation_project (
765
765
self ,
766
+ name : str ,
767
+ media_type : MediaType ,
768
+ description : Optional [str ] = None ,
769
+ auto_audit_percentage : Optional [float ] = None ,
770
+ auto_audit_number_of_labels : Optional [int ] = None ,
771
+ quality_modes : Optional [Set [QualityMode ]] = {
772
+ QualityMode .Benchmark ,
773
+ QualityMode .Consensus ,
774
+ },
775
+ is_benchmark_enabled : Optional [bool ] = None ,
776
+ is_consensus_enabled : Optional [bool ] = None ,
766
777
dataset_id : Optional [str ] = None ,
767
778
dataset_name : Optional [str ] = None ,
768
779
data_row_count : int = 100 ,
769
- ** kwargs ,
770
780
) -> Project :
771
781
"""
772
782
Use this method exclusively to create a prompt and response generation project.
@@ -805,31 +815,35 @@ def create_prompt_response_generation_project(
805
815
"Only provide a dataset_name or dataset_id, not both."
806
816
)
807
817
808
- if data_row_count <= 0 :
809
- raise ValueError ("data_row_count must be a positive integer." )
810
-
811
818
if dataset_id :
812
819
append_to_existing_dataset = True
813
820
dataset_name_or_id = dataset_id
814
821
else :
815
822
append_to_existing_dataset = False
816
823
dataset_name_or_id = dataset_name
817
824
818
- if " media_type" in kwargs and kwargs . get ( "media_type" ) not in [
825
+ if media_type not in [
819
826
MediaType .LLMPromptCreation ,
820
827
MediaType .LLMPromptResponseCreation ,
821
828
]:
822
829
raise ValueError (
823
830
"media_type must be either LLMPromptCreation or LLMPromptResponseCreation"
824
831
)
825
832
826
- kwargs ["dataset_name_or_id" ] = dataset_name_or_id
827
- kwargs ["append_to_existing_dataset" ] = append_to_existing_dataset
828
- kwargs ["data_row_count" ] = data_row_count
829
-
830
- kwargs .pop ("editor_task_type" , None )
831
-
832
- return self ._create_project (_CoreProjectInput (** kwargs ))
833
+ input = {
834
+ "name" : name ,
835
+ "description" : description ,
836
+ "media_type" : media_type ,
837
+ "auto_audit_percentage" : auto_audit_percentage ,
838
+ "auto_audit_number_of_labels" : auto_audit_number_of_labels ,
839
+ "quality_modes" : quality_modes ,
840
+ "is_benchmark_enabled" : is_benchmark_enabled ,
841
+ "is_consensus_enabled" : is_consensus_enabled ,
842
+ "dataset_name_or_id" : dataset_name_or_id ,
843
+ "append_to_existing_dataset" : append_to_existing_dataset ,
844
+ "data_row_count" : data_row_count ,
845
+ }
846
+ return self ._create_project (_CoreProjectInput (** input ))
833
847
834
848
def create_response_creation_project (self , ** kwargs ) -> Project :
835
849
"""
0 commit comments