fix: new chat load

This commit is contained in:
Timothy J. Baek 2023-11-19 20:39:13 -08:00
parent e116016543
commit 6a2c1600f5
5 changed files with 37 additions and 21 deletions

View file

@ -50,10 +50,12 @@
if (API_BASE_URL === '') {
API_BASE_URL = BUILD_TIME_API_BASE_URL;
}
const res = await getModels(API_BASE_URL, 'ollama');
const _models = await getModels(API_BASE_URL, 'ollama');
if (res) {
if (_models.length > 0) {
toast.success('Server connection verified');
await models.set(_models);
saveSettings({
API_BASE_URL: API_BASE_URL
});