Update web-app/src/lib/completion.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Louis 2025-10-08 10:08:28 +07:00 committed by GitHub
parent c63604ac55
commit 583a9bb7af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -182,7 +182,7 @@ export const sendCompletion = async (
} }
} }
if (!secretKey) { if (!secretKey) {
throw new Error('Encryption key unavailable: cannot encrypt API key.') throw new Error('Encryption key unavailable: cannot decrypt API key.')
} }
const apiKey = provider.api_key const apiKey = provider.api_key
? decryptApiKey(provider.api_key, secretKey) ? decryptApiKey(provider.api_key, secretKey)