-
Notifications
You must be signed in to change notification settings - Fork 18
Store the model list in the DB #277
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
Conversation
05d54e7 to
2d4f190
Compare
kyteinsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
| if (!$refresh) { | ||
| if ($this->modelsMemoryCache !== null) { | ||
| $this->logger->debug('Getting OpenAI models from the memory cache'); | ||
| return $this->modelsMemoryCache; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The memory cache is never populated when the value is retrieved from the distributed cache. Might be nice to do that
marcelklehr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did not test. looks good.
…e is accessed and on upgrade to 3.9.0 and once a day in a bg job Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
461afcc to
ead25f3
Compare
closes #272
This prevents the model list to be obtained with a network request to the external service when populating the enum values of the task processing providers (which is a problem when the remote service is unreachable).
We now store the model list in a permanent storage (the DB) and it is only refreshed: