opensearch-project / opensearch-php

Official PHP Client for OpenSearch
Other
99 stars 56 forks source link

Implement model, model group and connector apis #170

Closed acha5066 closed 9 months ago

acha5066 commented 10 months ago

Description

This PR implements the model, model group and connector apis from the ML Commons API so that developers can set up connectors to 3rd party tools like OpenAI as described here: https://github.com/opensearch-project/ml-commons/blob/main/docs/remote_inference_blueprints/openai_connector_embedding_blueprint.md

Issues Resolved

Closes #169

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

acha5066 commented 10 months ago

Regarding DCO I did signoff with Andrew Chappell and changed my username like: git config --global user.name "Andrew Chappell" so not sure why that isn't reflected. It keeps associating with andrew.chappell :thinking:

codecov[bot] commented 10 months ago

Codecov Report

Attention: 84 lines in your changes are missing coverage. Please review.

Comparison is base (9ebb183) 24.19% compared to head (e55cd04) 25.99%.

:exclamation: Current head e55cd04 differs from pull request most recent head 8a516e5. Consider uploading reports for the commit 8a516e5 to get more accurate results

Files Patch % Lines
...OpenSearch/Namespaces/MachineLearningNamespace.php 85.81% 20 Missing :warning:
...nts/MachineLearning/Connectors/DeleteConnector.php 50.00% 5 Missing :warning:
...points/MachineLearning/Connectors/GetConnector.php 50.00% 5 Missing :warning:
...s/MachineLearning/ModelGroups/DeleteModelGroup.php 50.00% 5 Missing :warning:
...s/MachineLearning/ModelGroups/UpdateModelGroup.php 50.00% 5 Missing :warning:
...h/Endpoints/MachineLearning/Models/DeleteModel.php 50.00% 5 Missing :warning:
...h/Endpoints/MachineLearning/Models/DeployModel.php 50.00% 5 Missing :warning:
...arch/Endpoints/MachineLearning/Models/GetModel.php 50.00% 5 Missing :warning:
...earch/Endpoints/MachineLearning/Models/Predict.php 50.00% 5 Missing :warning:
...Endpoints/MachineLearning/Models/UndeployModel.php 50.00% 5 Missing :warning:
... and 8 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #170 +/- ## ============================================ + Coverage 24.19% 25.99% +1.79% - Complexity 1938 2018 +80 ============================================ Files 246 263 +17 Lines 6865 7145 +280 ============================================ + Hits 1661 1857 +196 - Misses 5204 5288 +84 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

acha5066 commented 9 months ago

DCO should be fine now

dblock commented 9 months ago

@shyim Got some time to CR this?