ollama支持

This commit is contained in:
IndieKKY
2024-04-12 10:18:44 +08:00
parent c40338a5f5
commit 60697769bb
9 changed files with 85 additions and 80 deletions

View File

@@ -1,6 +1,8 @@
import {DEFAULT_SERVER_URL_OPENAI} from '../const'
const getServerUrl = (serverUrl?: string) => {
if (!serverUrl) {
return 'https://api.openai.com'
return DEFAULT_SERVER_URL_OPENAI
}
if (serverUrl.endsWith('/')) {
serverUrl = serverUrl.slice(0, -1)