(payload: AiConnectionPayload)
| 15 | }; |
| 16 | |
| 17 | export async function testAiConnection(payload: AiConnectionPayload): Promise<{ |
| 18 | success: boolean; |
| 19 | model?: string; |
| 20 | error?: string; |
| 21 | }> { |
| 22 | return httpRequest<{ success: boolean; model?: string; error?: string }>("/api/ai/test", { |
| 23 | method: "POST", |
| 24 | body: payload, |
| 25 | }); |
| 26 | } |
| 27 | |
| 28 | export async function chatWithAi(payload: AiChatPayload): Promise<{ |
| 29 | content?: string; |
no test coverage detected