Add Claude API support and fix CORS issues
- Add Claude API integration to LLM service - Create Express backend server with CORS support - Add API proxy example page - Fix CORS errors by routing through backend - Update LLM configuration to support Claude - Add package.json with dependencies 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,15 @@ router.post('/test/openai', asyncHandler(async (req, res) => {
|
||||
res.json(result);
|
||||
}));
|
||||
|
||||
/**
|
||||
* POST /api/llm/test/claude
|
||||
* 測試 Claude API 連線
|
||||
*/
|
||||
router.post('/test/claude', asyncHandler(async (req, res) => {
|
||||
const result = await llmService.testClaudeConnection();
|
||||
res.json(result);
|
||||
}));
|
||||
|
||||
/**
|
||||
* POST /api/llm/test/all
|
||||
* 測試所有 LLM API 連線
|
||||
|
||||
Reference in New Issue
Block a user