* 测试列表中的文本服务商
(name: string, provider: Provider)
| 339 | * 测试列表中的文本服务商 |
| 340 | */ |
| 341 | async function testTextProviderInList(name: string, provider: Provider) { |
| 342 | try { |
| 343 | const result = await testConnection({ |
| 344 | type: provider.type, |
| 345 | provider_name: name, |
| 346 | api_key: undefined, |
| 347 | base_url: provider.base_url, |
| 348 | endpoint_type: provider.endpoint_type, |
| 349 | model: provider.model |
| 350 | }) |
| 351 | if (result.success) { |
| 352 | setSuccess(`${name} 连接成功`) |
| 353 | } |
| 354 | } catch (e: any) { |
| 355 | setError(e, `${name} 连接失败`) |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | // ==================== 图片服务商操作 ==================== |
| 360 |
nothing calls this directly
no test coverage detected