refac: openai allow empty key

This commit is contained in:
Timothy J. Baek
2024-05-29 01:12:25 -07:00
parent 943baad689
commit e8d4e03c0d
5 changed files with 91 additions and 44 deletions
+2 -2
View File
@@ -135,10 +135,10 @@ export const updateOllamaUrls = async (token: string = '', urls: string[]) => {
return res.OLLAMA_BASE_URLS;
};
export const getOllamaVersion = async (token: string = '') => {
export const getOllamaVersion = async (token: string, urlIdx?: number) => {
let error = null;
const res = await fetch(`${OLLAMA_API_BASE_URL}/api/version`, {
const res = await fetch(`${OLLAMA_API_BASE_URL}/api/version${urlIdx ? `/${urlIdx}` : ''}`, {
method: 'GET',
headers: {
Accept: 'application/json',