feat: replace Claude with GPT for AI chat integration
- Replace ClaudeAdapter with GPTAdapter using OpenAI GPT (gpt-5-mini) - Implement function calling for calendar operations (getDay, proposeCreate/Update/Delete, searchEvents) - Add provider-agnostic AI utilities in ai/utils/ (systemPrompt, toolDefinitions, toolExecutor, eventFormatter) - Add USE_TEST_RESPONSES env var to toggle between real AI and test responses - Switch ChatService.processMessage to use real AI provider - Add npm run format command for Prettier - Update CLAUDE.md with new architecture
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
MongoEventRepository,
|
||||
MongoChatRepository,
|
||||
} from "./repositories";
|
||||
import { ClaudeAdapter } from "./ai";
|
||||
import { GPTAdapter } from "./ai";
|
||||
|
||||
const app = express();
|
||||
const port = process.env.PORT || 3000;
|
||||
@@ -43,7 +43,7 @@ const eventRepo = new MongoEventRepository();
|
||||
const chatRepo = new MongoChatRepository();
|
||||
|
||||
// Initialize AI provider
|
||||
const aiProvider = new ClaudeAdapter();
|
||||
const aiProvider = new GPTAdapter();
|
||||
|
||||
// Initialize services
|
||||
const authService = new AuthService(userRepo);
|
||||
|
||||
Reference in New Issue
Block a user