add player2 to config and fix url (#311)

This commit is contained in:
lorisj-elefant
2025-07-23 10:42:13 +08:00
committed by GitHub
parent cda8f09102
commit 6f9b2b6f8a
2 changed files with 2 additions and 2 deletions
@@ -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))
+1 -1
View File
@@ -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',