Task #3074
Feature #3024: extension 0.92.20 & 0.93: Enable OpenAI answers
Feature #3061: Backend requirements
BE-0.92.20: Allow caching to the OpenAI encrypted secret key.
Description
1. Go to the login page, https://edutestqa.appspot.com/admin/login
2. Login through 'Admin' role user.
3. Go to the settings page for OpenAI, https://edutestqa.appspot.com/admin/qnageneration/settings#openAiAnswerConfigForm
4. When we put the secret key, 'something' and then click on 'Set'. It will go & saved into the datastore.
At the time of calling the OpenAI Answer API, it will fetch the secret key from the datastore every time. It will increase the load time. So in order to make it efficient, we have to apply the caching to the openai secret key.
Scheme: 1. If the secret key is newly added then cache it on the server. 2. If someone changed the secret key then update the caching for the secret key. 3. If the secret key is present in the caching then load it from the caching instead of doing the datastore call.
Open AI API Endpoints:
URL: http://edutestqa.appspot.com/admin/content/api/v1/answer
Method: "POST" Request Body: (application/json) { "searchTerm": "Once upon a time" }
Overview of the API:
If api is enabled & the key is present, then it will give the response from openai. If not then it will return 512 words lorem ipsum.
Updated by Md Shahzar over 1 year ago
- Status changed from New to In Progress
- % Done changed from 0 to 70
Updated by Ayush Khandelwal over 1 year ago
- Status changed from Resolved to Reopened
- % Done changed from 100 to 50
Updated by Md Shahzar over 1 year ago
- Status changed from In Progress to Resolved
- % Done changed from 50 to 100
Updated by Ayush Khandelwal over 1 year ago
- Status changed from Review to Feedback
- Assignee changed from Ayush Khandelwal to Md Shahzar
Updated by Md Shahzar over 1 year ago
- Status changed from Feedback to Reopened
- Assignee changed from Ayush Khandelwal to Md Shahzar
Updated by Md Shahzar over 1 year ago
- Status changed from Resolved to Review
- Assignee changed from Md Shahzar to Ayush Khandelwal
Updated by Ayush Khandelwal over 1 year ago
- Status changed from Review to Reopened
- Assignee changed from Ayush Khandelwal to Md Shahzar
- % Done changed from 100 to 50
MR having some review points.
Updated by Ayush Khandelwal over 1 year ago
- Handle the openai error separately instead of catching it through null pointer exception.
- Log the openai error as a severe log level.
- Add the ticket number to the title of the merge request.
Updated by Md Shahzar over 1 year ago
- Status changed from In Progress to Resolved
- % Done changed from 50 to 100
Updated by Md Shahzar over 1 year ago
- Status changed from Resolved to Review
- Assignee changed from Md Shahzar to Ayush Khandelwal
Updated by Ayush Khandelwal over 1 year ago
- Status changed from Review to Feedback
- Assignee changed from Ayush Khandelwal to Md Shahzar
Updated by Ayush Khandelwal over 1 year ago
- Status changed from Feedback to Closed
Working as expected