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:
donald
2025-12-04 00:05:36 +08:00
parent de89a64bf2
commit bf475d16c1
7 changed files with 832 additions and 2 deletions

View File

@@ -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 連線