Files
calchat/apps/server/src/ai/ClaudeAdapter.ts

22 lines
570 B
TypeScript

import Anthropic from "@anthropic-ai/sdk";
import { AIProvider, AIContext, AIResponse } from "../services/interfaces";
export class ClaudeAdapter implements AIProvider {
private client: Anthropic;
private model: string;
constructor(apiKey?: string, model: string = "claude-3-haiku-20240307") {
this.client = new Anthropic({
apiKey: apiKey || process.env.ANTHROPIC_API_KEY,
});
this.model = model;
}
async processMessage(
message: string,
context: AIContext,
): Promise<AIResponse> {
throw new Error("Not implemented");
}
}