MCPcopy Index your code
hub / github.com/HisMax/RedInk / testImageProviderInList

Function testImageProviderInList

frontend/src/composables/useProviderForm.ts:500–516  ·  view source on GitHub ↗

* 测试列表中的图片服务商

(name: string, provider: Provider)

Source from the content-addressed store, hash-verified

498 * 测试列表中的图片服务商
499 */
500 async function testImageProviderInList(name: string, provider: Provider) {
501 try {
502 const result = await testConnection({
503 type: provider.type,
504 provider_name: name,
505 api_key: undefined,
506 base_url: provider.base_url,
507 endpoint_type: provider.endpoint_type,
508 model: provider.model
509 })
510 if (result.success) {
511 setSuccess(`${name} 连接成功`)
512 }
513 } catch (e: any) {
514 setError(e, `${name} 连接失败`)
515 }
516 }
517
518 /**
519 * 更新文本表单数据

Callers

nothing calls this directly

Calls 3

testConnectionFunction · 0.90
setSuccessFunction · 0.85
setErrorFunction · 0.85

Tested by

no test coverage detected