opensearch-py-ml icon indicating copy to clipboard operation
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

Open rbpasker opened this issue 7 months ago • 1 comments

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:

image

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

rbpasker avatar Jun 28 '24 20:06 rbpasker