mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 14:15:24 +02:00
feat: add AI Settings modal to manage API keys from the UI
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
export async function generateDescription(prompt: string, systemPrompt: string): Promise<string> {
|
||||
const apiKey = import.meta.env.VITE_ANTHROPIC_API_KEY || localStorage.getItem('ANTHROPIC_API_KEY') || '';
|
||||
const apiKey =
|
||||
localStorage.getItem('ANTHROPIC_API_KEY') ||
|
||||
import.meta.env.VITE_ANTHROPIC_API_KEY ||
|
||||
'';
|
||||
if (!apiKey) {
|
||||
throw new Error('Anthropic API Key not found. Please set VITE_ANTHROPIC_API_KEY in .env or ANTHROPIC_API_KEY in localStorage.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user