feat: azure openai support

This commit is contained in:
Timothy Jaeryang Baek
2025-05-19 03:40:32 +04:00
parent 47f8b3500b
commit caeb822cdc
5 changed files with 174 additions and 111 deletions
+2 -7
View File
@@ -1,10 +1,6 @@
import { OLLAMA_API_BASE_URL } from '$lib/constants';
export const verifyOllamaConnection = async (
token: string = '',
url: string = '',
key: string = ''
) => {
export const verifyOllamaConnection = async (token: string = '', connection: dict = {}) => {
let error = null;
const res = await fetch(`${OLLAMA_API_BASE_URL}/verify`, {
@@ -15,8 +11,7 @@ export const verifyOllamaConnection = async (
'Content-Type': 'application/json'
},
body: JSON.stringify({
url,
key
...connection
})
})
.then(async (res) => {