-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Cannot add openai embedding connector in dev tools #2498
Comments
@opensearch-project/admin Please move this one to ML-commons repo. Thanks |
@max-tano which version are you using ? If you are using AWS managed OpenSearch service, you can refer to this tutorial https://github.com/opensearch-project/ml-commons/blob/2.x/docs/tutorials/aws/AIConnectorHelper.ipynb or https://github.com/opensearch-project/ml-commons/blob/2.x/docs/tutorials/aws/semantic_search_with_openai_embedding_model.md |
Its version 2.13 of aws managed opensearch. I tried the second tutorial but get the same 502 response, are you able to connect a external model (for example open ai ada 2)? |
@max-tano It should work, can you try the first tutorial which is much easier ? |
Also getting this error with version 2.13. The same code worked in 2.11. |
@drobbins-ancile , @max-tano Sorry for replying late. Let's have a call to go through the error? I tried on Amazon managed OpenSearch 2.13 by following https://github.com/opensearch-project/ml-commons/blob/2.x/docs/tutorials/aws/AIConnectorHelper.ipynb, it works. You can join OpenSearch community slack https://join.slack.com/t/opensearch/shared_invite/zt-2kgztctzr-kVrVcH1~sq5f85DjoDqAyA, then you can find me in the public slack channel |
@ylwu-amzn The issue here seems to be specifically that we can no longer create a connector where the JSON includes a The notebook you linked above creates a connector using We're creating a connector that uses The connector blueprints still show this as a valid connector config but it fails when attempting to create it. The docs also show this a valid config. So this appears to have been broken after 2.11. |
If you are using AWS managed OpenSearch cluster, you should not use
Check this tutorial https://github.com/opensearch-project/ml-commons/blob/2.x/docs/tutorials/aws/semantic_search_with_openai_embedding_model.md#42-create-connector, you should use
Verified on AWS managed OpenSearch cluster 2.13, this tutorial still works https://github.com/opensearch-project/ml-commons/blob/2.x/docs/tutorials/aws/AIConnectorHelper.ipynb. |
Specifying the API key directly in the credentials object is not supported after 2.11? If that is correct, do you have the PR where this support was removed? |
AWS OpenSearch 2.13 restrict only |
Close this issue as no more comment after 4 month. Please reopen or create a new issue if need more help. |
Describe the bug
When i follow the steps to add a external connector i always get a 502.
Here is a sample of a post i put in the dev console
POST /_plugins/_ml/connectors/_create
{
"name": "embedding_ada",
"description": "My connector to create embedding using ada model",
"version": "1.0",
"protocol": "http",
"parameters": {
"model": "text-embedding-ada-002"
},
"credential": {
"openAI_key": "Bearer key"
},
"actions": [
{
"action_type": "predict",
"method": "POST",
"url": "https://api.openai.com/v1/embeddings",
"headers": {
"Authorization": "Bearer ${credential.openAI_key}"
},
"request_body": "{ "input": ${parameters.input}, "model": "${parameters.model}" }",
"pre_process_function": "connector.pre_process.openai.embedding",
"post_process_function": "connector.post_process.openai.embedding"
}
]
}
An this also returns a 502 "Request failed to get to the server (status code: 502)"
Please lmk when this is fixed
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
OpenSearch Version
Please list the version of OpenSearch being used.
Dashboards Version
Please list the version of OpenSearch Dashboards being used.
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: