add player2 to config and fix url (#311)
This commit is contained in:
@@ -37,7 +37,7 @@ const {
|
||||
|
||||
// Popular providers for first-time setup
|
||||
const popularProviders = computed(() => {
|
||||
const popular = ['openai', 'anthropic', 'google-generative-ai', 'openrouter-ai', 'ollama', 'deepseek']
|
||||
const popular = ['openai', 'anthropic', 'google-generative-ai', 'openrouter-ai', 'ollama', 'deepseek', 'player2']
|
||||
return allChatProvidersMetadata.value
|
||||
.filter(provider => popular.includes(provider.id))
|
||||
.sort((a, b) => popular.indexOf(a.id) - popular.indexOf(b.id))
|
||||
|
||||
@@ -1477,7 +1477,7 @@ export const useProvidersStore = defineStore('providers', () => {
|
||||
validators: {
|
||||
validateProviderConfig: async (config) => {
|
||||
// Check if the Ollama server is reachable
|
||||
return !!config.baseUrl && await fetch(`${config.baseUrl}/health`, {
|
||||
return !!config.baseUrl && await fetch(`${(config.baseUrl as string).endsWith('/') ? (config.baseUrl as string).slice(0, -1) : config.baseUrl}/health`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'player2-game-key': 'airi',
|
||||
|
||||
Reference in New Issue
Block a user