File tree Expand file tree Collapse file tree
libs/labelbox/src/labelbox/schema Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1183,25 +1183,29 @@ def get_label_count(self) -> int:
11831183 res = self .client .execute (query_str , {"projectId" : self .uid })
11841184 return res ["project" ]["labelCount" ]
11851185
1186- def add_model_config (self , model_config_id : str ) -> str :
1186+ def add_model_config (
1187+ self , model_config_id : str , response_count : Optional [int ] = None
1188+ ) -> str :
11871189 """Adds a model config to this project.
11881190
11891191 Args:
11901192 model_config_id (str): ID of a model config to add to this project.
1193+ response_count (Optional[int]): Number of responses to generate. If not provided, uses the default.
11911194
11921195 Returns:
11931196 str, ID of the project model config association. This is needed for updating and deleting associations.
11941197 """
11951198
1196- query = """mutation CreateProjectModelConfigPyApi($projectId: ID!, $modelConfigId: ID!) {
1197- createProjectModelConfig(input: {projectId: $projectId, modelConfigId: $modelConfigId}) {
1199+ query = """mutation CreateProjectModelConfigPyApi($projectId: ID!, $modelConfigId: ID!, $responseCount: Int ) {
1200+ createProjectModelConfig(input: {projectId: $projectId, modelConfigId: $modelConfigId, responseCount: $responseCount }) {
11981201 projectModelConfigId
11991202 }
12001203 }"""
12011204
12021205 params = {
12031206 "projectId" : self .uid ,
12041207 "modelConfigId" : model_config_id ,
1208+ "responseCount" : response_count ,
12051209 }
12061210 try :
12071211 result = self .client .execute (query , params )
You can’t perform that action at this time.
0 commit comments