Files
GMW/services/frontend/src/lib/api/chatbot.ts
T

12 lines
368 B
TypeScript
Raw Normal View History

import type { ChatbotResponse, ChatHistoryMessage } from "@/lib/types";
import { api } from "./client";
export const chatbotApi = {
send: (message: string) =>
api.post<ChatbotResponse>("/api/chat", { message }),
getHistory: () => api.get<ChatHistoryMessage[]>("/api/chat/history"),
clearHistory: () => api.delete<{ ok: boolean }>("/api/chat/history"),
};