@@ -21,10 +21,10 @@ def scoring_functions():
2121@scoring_functions .command ()
2222@click .option ("--scoring-fn-id" , required = True , help = "Id of the scoring function" )
2323@click .option ("--description" , required = True , help = "Description of the scoring function" )
24- @click .option ("--return-type" , required = True , help = "Return type of the scoring function" )
25- @click .option ("--provider-id" , help = "Provider ID for the scoring function" , default = None )
26- @click .option ("--provider-scoring-fn-id" , help = "Provider's scoring function ID" , default = None )
27- @click .option ("--params" , type = str , help = "Parameters for the scoring function in JSON format" )
24+ @click .option ("--return-type" , type = str , required = True , help = "Return type of the scoring function" )
25+ @click .option ("--provider-id" , type = str , help = "Provider ID for the scoring function" , default = None )
26+ @click .option ("--provider-scoring-fn-id" , type = str , help = "Provider's scoring function ID" , default = None )
27+ @click .option ("--params" , type = str , help = "Parameters for the scoring function in JSON format" , default = None )
2828@click .pass_context
2929def register (
3030 ctx ,
@@ -47,7 +47,7 @@ def register(
4747 response = client .scoring_functions .register (
4848 scoring_fn_id = scoring_fn_id ,
4949 description = description ,
50- return_type = return_type ,
50+ return_type = json . loads ( return_type ) ,
5151 provider_id = provider_id ,
5252 provider_scoring_fn_id = provider_scoring_fn_id ,
5353 params = params ,
0 commit comments