When trying to create Embedded indexes for contenttypes so it can throw error when the request is invalid (integer tokens) then API doesn't return data object as JSONArray
Steps to Reproduce
There are no exact steps to reproduce this issue. However when request is invalid (integer tokens) then API doesn't return data object as JSONArray and dotCMS logs shows
api.EmbeddingsRunner: unable to embed content:3b75f5cfb2bc6687f3d6da94d26f86df error:JSONObject["data"] is not a JSONArray.
Note: Current master has slightly changed way to retrieve results, but at the end If API doesn't return DATA object then it will fail with same error.
Acceptance Criteria
If OpenAIRequest.doRequest() doesn't return a valid response, it should be handled appropriately and must log the reasons instead of failing because of "JSONObject["data"]" not being a JSONArray.
dotCMS Version
24.04.24_lts_v2
Proposed Objective
Customer Support
Proposed Priority
Priority 4 - Trivial
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
Parent Issue
No response
Problem Statement
When trying to create Embedded indexes for contenttypes so it can throw error when the request is invalid (integer tokens) then API doesn't return data object as JSONArray
Steps to Reproduce
There are no exact steps to reproduce this issue. However when request is invalid (integer tokens) then API doesn't return data object as JSONArray and dotCMS logs shows
api.EmbeddingsRunner: unable to embed content:3b75f5cfb2bc6687f3d6da94d26f86df error:JSONObject["data"] is not a JSONArray.
Note: Current master has slightly changed way to retrieve results, but at the end If API doesn't return DATA object then it will fail with same error.
Acceptance Criteria
If OpenAIRequest.doRequest() doesn't return a valid response, it should be handled appropriately and must log the reasons instead of failing because of "JSONObject["data"]" not being a JSONArray.
dotCMS Version
24.04.24_lts_v2
Proposed Objective
Customer Support
Proposed Priority
Priority 4 - Trivial
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
https://dotcms.zendesk.com/agent/tickets/116783
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response