MCPcopy
hub / github.com/HisMax/RedInk / testTextProviderInList

Function testTextProviderInList

frontend/src/composables/useProviderForm.ts:341–357  ·  view source on GitHub ↗

* 测试列表中的文本服务商

(name: string, provider: Provider)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

testConnectionFunction · 0.90
setSuccessFunction · 0.85
setErrorFunction · 0.85

Tested by

no test coverage detected