feat: implement admin knowledge extraction system with document upload and AI pipeline integration
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user