You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use this method exclusively to create a prompt and response generation project.
886
+
887
+
Args:
888
+
dataset_name: When creating a new dataset, pass the name
889
+
dataset_id: When using an existing dataset, pass the id
890
+
data_row_count: The number of data row assets to use for the project
891
+
**kwargs: Additional parameters to pass see the create_project method
892
+
Returns:
893
+
Project: The created project
894
+
895
+
NOTE: Only a dataset_name or dataset_id should be included
896
+
897
+
Examples:
898
+
>>> client.create_prompt_response_generation_project(name=project_name, dataset_name="new data set", project_kind=MediaType.LLMPromptResponseCreation)
899
+
>>> This creates a new dataset with a default number of rows (100), creates new project and assigns a batch of the newly created datarows to the project.
900
+
901
+
>>> client.create_prompt_response_generation_project(name=project_name, dataset_name="new data set", data_row_count=10, project_kind=MediaType.LLMPromptCreation)
902
+
>>> This creates a new dataset with 10 data rows, creates new project and assigns a batch of the newly created datarows to the project.
>>> This creates a new project, and adds 100 datarows to the dataset with id "clr00u8j0j0j0" and assigns a batch of the newly created data rows to the project.
>>> This creates a new project, and adds 100 datarows to the dataset with id "clr00u8j0j0j0" and assigns a batch of the newly created 10 data rows to the project.
909
+
910
+
"""
911
+
ifnotdataset_idandnotdataset_name:
912
+
raiseValueError(
913
+
"dataset_name or dataset_id must be present and not be an empty string."
914
+
)
915
+
916
+
ifdataset_idanddataset_name:
917
+
raiseValueError(
918
+
"Only provide a dataset_name or dataset_id, not both."
919
+
)
920
+
921
+
ifdata_row_count<=0:
922
+
raiseValueError("data_row_count must be a positive integer.")
0 commit comments