Merge pull request #54 from ollama-webui/dev

fix: openai error message
This commit is contained in:
Timothy Jaeryang Baek 2023-11-03 21:31:04 -05:00 committed by GitHub
commit 8573fd523a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -378,10 +378,10 @@
})
.catch((error) => {
console.log(error);
toast.error(`OpenAI: ${error.error.message}`);
toast.error(`OpenAI: ${error?.error?.message ?? 'Network Problem'}`);
return null;
});
const openaiModels = openaiModelRes.data;
const openaiModels = openaiModelRes?.data ?? null;
if (openaiModels) {
models = [