opensearch-py-ml
opensearch-py-ml copied to clipboard
the ML libraries should use `body` keyword arg instead of `payload` for the JSON document to mirror the other OpenSearch APIs
the ML python libraries use payload
as they keyword argument for the of the HTTP request. This diverges from the main OpenSearech APIs, which the keyword body
, eg, Ingest:
for example:
def create_standalone_connector(self, payoad: dict):
should be:
def create_standalone_connector(self, body: dict):
to conform
https://github.com/opensearch-project/opensearch-py-ml/blob/ec7e0235d9092cb26fe3d889d8ab7fae28dccefe/opensearch_py_ml/ml_commons/model_connector.py#L17