opensearch-project / opensearch-py-ml

Apache License 2.0
34 stars 63 forks source link

the ML libraries should use `body` keyword arg instead of `payload` for the JSON document to mirror the other OpenSearch APIs #397

Open rbpasker opened 4 months ago

rbpasker commented 4 months ago

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

dblock commented 3 months ago

Makes sense, thanks for opening this @rbpasker. Care to try and fix it?

[Catch All Triage w/ 1, 2, 3]