aiverify-moonshot 0.4.6__py3-none-any.whl → 0.4.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -392,10 +392,10 @@ ERROR_COMMON_UPDATE_ENDPOINT_ENDPOINT_VALIDATION = (
392
392
  "The 'endpoint' argument must be a non-empty string and not None."
393
393
  )
394
394
  ERROR_COMMON_UPDATE_ENDPOINT_VALUES_VALIDATION = (
395
- "The 'update_values' argument must be a non-empty string and not None."
395
+ "The 'update_kwargs' argument must be a non-empty string and not None."
396
396
  )
397
397
  ERROR_COMMON_UPDATE_ENDPOINT_VALUES_VALIDATION_1 = (
398
- "The 'update_values' argument must evaluate to a list of tuples."
398
+ "The 'update_kwargs' argument must evaluate to a list of tuples."
399
399
  )
400
400
 
401
401
  # ------------------------------------------------------------------------------
@@ -280,19 +280,19 @@ def update_endpoint(args) -> None:
280
280
  endpoint = args.endpoint
281
281
 
282
282
  if (
283
- args.update_values is None
284
- or not isinstance(args.update_values, str)
285
- or not args.update_values
283
+ args.update_kwargs is None
284
+ or not isinstance(args.update_kwargs, str)
285
+ or not args.update_kwargs
286
286
  ):
287
287
  raise ValueError(ERROR_COMMON_UPDATE_ENDPOINT_VALUES_VALIDATION)
288
288
 
289
- if literal_eval(args.update_values) and all(
290
- isinstance(i, tuple) for i in literal_eval(args.update_values)
289
+ if literal_eval(args.update_kwargs) and all(
290
+ isinstance(i, tuple) for i in literal_eval(args.update_kwargs)
291
291
  ):
292
- update_values = dict(literal_eval(args.update_values))
292
+ update_kwargs = dict(literal_eval(args.update_kwargs))
293
293
  else:
294
294
  raise ValueError(ERROR_COMMON_UPDATE_ENDPOINT_VALUES_VALIDATION_1)
295
- api_update_endpoint(endpoint, **update_values)
295
+ api_update_endpoint(endpoint, **update_kwargs)
296
296
  print("[update_endpoint]: Endpoint updated.")
297
297
  except Exception as e:
298
298
  print(f"[update_endpoint]: {str(e)}")
@@ -465,7 +465,7 @@ update_endpoint_args = cmd2.Cmd2ArgumentParser(
465
465
  " params: Extra arguments for the endpoint\n\n"
466
466
  "Example:\n"
467
467
  " update_endpoint openai-gpt4 \"[('name', 'my-special-openai-endpoint'), "
468
- "('uri', 'my-uri-loc'), ('token', 'my-token-here')]\""
468
+ "('uri', 'my-uri-loc'), ('token', 'my-token-here'), ('params', {'hello': 'world'})]\""
469
469
  ),
470
470
  )
471
471
  update_endpoint_args.add_argument(
@@ -71,7 +71,7 @@ def create_app(cfg: providers.Configuration) -> CustomFastAPI:
71
71
  }
72
72
 
73
73
  app: CustomFastAPI = CustomFastAPI(
74
- title="Project Moonshot", version="0.4.6", **app_kwargs
74
+ title="Project Moonshot", version="0.4.8", **app_kwargs
75
75
  )
76
76
 
77
77
  if cfg.cors.enabled():