-
Notifications
You must be signed in to change notification settings - Fork 30
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] need fix #2655 for RAGTool to handle pure json response #470
Comments
Hi, Thanks for reporting the bug! Would you like to try and fix it? @layavadi |
Yea. Working on it. My first time. So it is taking bit longer.
Vadi
…On Tue, 26 Nov, 2024, 02:27 Pavan Yekbote, ***@***.***> wrote:
Hi, Thanks for reporting the bug! Would you like to try and fix it?
@layavadi <https://github.com/layavadi>
—
Reply to this email directly, view it on GitHub
<#470>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZK35FUPQHO3SGRAD3BY3D2COFMNAVCNFSM6AAAAABSN44UJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJZGAYTOMZXGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @layavadi, no rush - please take your time. I only wanted to understand if you were working on it so we don't duplicate effort and can assign this issue to you. Next time you start working on an issue, please comment on the issue and one of the maintainers will assign the task to you! Thank you for your contribution! Appreciate it! |
Hi @layavadi are you going to raise PR for this fix? we should follow similar fix to MLModelTool. We moved the issue to skill repo because RAGTool lives in skills repo. If you have a PR, I will be happy to help review. please let me know. Thanks! |
Hi ,
I havent created a PR yet. I will do it shortly.just getting around some
other problem related to ML tool flow. Also this is my first PR . So taking
a while. Apologogies. Will assign for review when it is ready.
Regards
Vadi
…On Wed, 4 Dec, 2024, 00:18 Mingshi Liu, ***@***.***> wrote:
Hi @layavadi <https://github.com/layavadi> are you going to raise PR for
this fix? we should follow similar fix to MLModelTool.
https://github.com/opensearch-project/ml-commons/pull/2655/files#diff-025c5b7117288bef7c3896a2596cf6575464c37390ed27c1663a1e73048547fdR70-R81
We moved the issue to skill repo because RAGTool lives in skills repo.you
have a PR, I will be appy to help review. please let me now. Thanks!
—
Reply to this email directly, view it on GitHub
<#470 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZK35D6CMQQWO4PYFRHKQT2DX4HZAVCNFSM6AAAAABS6OB43WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJVGMZTIMRQGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
What is the bug?
When connecting to OpenAI model for chat response getting following error while processing the response
TransportError(500, '{"error":{"reason":"System Error","details":"Cannot invoke \"org.opensearch.ml.common.output.Output.toXContent(org.opensearch.core.xcontent.XContentBuilder, org.opensearch.core.xcontent.ToXContent$Params)\" because \"this.output\" is null","type":"NullPointerException"},"status":500}', None)
This is because issue found in opensearch-project/ml-commons#2654
How can one reproduce the bug?
Same as opensearch-project/ml-commons#2654 where we use the RAGTool to connect openAI using connector with
"actions": [
{
"action_type": "predict",
"method": "POST",
"url": "https://${parameters.endpoint}/openai/deployments/${parameters.model}/chat/completions?api-version=${parameters.api_version}",
"headers": {
"api-key": "${credential.openAI_key}",
"Content-type": "application/json"
},
"request_body": "{ "model": "${parameters.model}", "messages": [ { "role":"user" , "content": " ${parameters.prompt} " } ] }"
}
and execute
body = {
"parameters": {
"question": query
}
}
response_str = ""
combined_response = ""
try:
response = client.http.post(f'/_plugins/_ml/agents/{agent_id}/_execute', body=body)
What is the expected behavior?
It is expected to fetch the response from OpenAI model .
What is your host/environment?
Docker image of OS running on MacOS
Do you have any screenshots?
Getting error while calling the client.http/post
TransportError(500, '{"error":{"reason":"System Error","details":"Cannot invoke \"org.opensearch.ml.common.output.Output.toXContent(org.opensearch.core.xcontent.XContentBuilder, org.opensearch.core.xcontent.ToXContent$Params)\" because \"this.output\" is null","type":"NullPointerException"},"status":500}', None)
Do you have any additional context?
This issue similar to opensearch-project/ml-commons#2654
And needs same fix Earlier for MLTool
https://github.com/opensearch-project/ml-commons/blob/f9cbf15edcf885fa3f64dbb39a467c29604bbc5c/ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/MLModelTool.java#L72
in RAGTool
skills/src/main/java/org/opensearch/agent/tools/RAGTool.java
Line 91 in a95cfae
The text was updated successfully, but these errors were encountered: