feat: implement admin knowledge extraction system with document upload and AI pipeline integration

This commit is contained in:
RaymondVerhoef
2026-05-10 11:18:48 +02:00
parent f8d0c68f84
commit 260644b41a
7 changed files with 625 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
import { storage } from './storage';
/**
* Anthropic API Service
* Handles communication with the /v1/messages endpoint.
@@ -16,7 +18,8 @@ export const anthropicApi = {
// In a real application, the API key should not be exposed to the client.
// For this prototype, we'll assume it's passed or available in the environment,
// or proxied via a secure endpoint if deployed.
const apiKey = import.meta.env.VITE_ANTHROPIC_API_KEY || 'no-key-provided';
// Prioritize key from local storage (set via Admin Settings)
const apiKey = storage.get('admin:anthropic_key') || import.meta.env.VITE_ANTHROPIC_API_KEY || 'no-key-provided';
while (retries <= maxRetries) {
try {