fix: correct conditional statement in ModelService.js (#1145)

This commit is contained in:
Danny Avila 2023-11-06 14:42:20 -05:00 committed by GitHub
parent 5f3ecef575
commit 4b63eb5a2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,7 @@ const fetchOpenAIModels = async (opts = { azure: false, plugins: false }, _model
return cachedModels; return cachedModels;
} }
if (basePath.includes('v1') || opts.azure) { if (basePath?.includes('v1') || opts.azure) {
try { try {
const res = await axios.get(`${basePath}${opts.azure ? '' : '/models'}`, { const res = await axios.get(`${basePath}${opts.azure ? '' : '/models'}`, {
headers: { headers: {