@@ -1118,18 +1118,19 @@ def get_label_count(self) -> int:
11181118 res = self .client .execute (query_str , {"projectId" : self .uid })
11191119 return res ["project" ]["labelCount" ]
11201120
1121- def add_model_config (self , model_config_id : str ) -> str :
1121+ def add_model_config (self , model_config_id : str , response_count : Optional [ int ] = None ) -> str :
11221122 """Adds a model config to this project.
11231123
11241124 Args:
11251125 model_config_id (str): ID of a model config to add to this project.
1126+ response_count (Optional[int]): Number of responses to generate. If not provided, uses the default.
11261127
11271128 Returns:
11281129 str, ID of the project model config association. This is needed for updating and deleting associations.
11291130 """
11301131
1131- query = """mutation CreateProjectModelConfigPyApi($projectId: ID!, $modelConfigId: ID!) {
1132- createProjectModelConfig(input: {projectId: $projectId, modelConfigId: $modelConfigId}) {
1132+ query = """mutation CreateProjectModelConfigPyApi($projectId: ID!, $modelConfigId: ID!, $responseCount: Int ) {
1133+ createProjectModelConfig(input: {projectId: $projectId, modelConfigId: $modelConfigId, responseCount: $responseCount }) {
11331134 projectModelConfigId
11341135 }
11351136 }"""
@@ -1138,6 +1139,9 @@ def add_model_config(self, model_config_id: str) -> str:
11381139 "projectId" : self .uid ,
11391140 "modelConfigId" : model_config_id ,
11401141 }
1142+
1143+ if response_count is not None :
1144+ params ["responseCount" ] = response_count
11411145 try :
11421146 result = self .client .execute (query , params )
11431147 except LabelboxError as e :
0 commit comments