feat: add topic summaries and growth profiles
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
import type { ApiResponse, CaptchaResult, ChatMessage, ChatSession, LoginResult, UserProfile } from "../types/api";
|
||||
import type {
|
||||
ApiResponse,
|
||||
CaptchaResult,
|
||||
ChatMessage,
|
||||
ChatSession,
|
||||
FinishTopicResult,
|
||||
GrowthProfileResult,
|
||||
LoginResult,
|
||||
UserProfile,
|
||||
} from "../types/api";
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE_URL ?? "/api";
|
||||
const TOKEN_KEY = "ai-kb-user-token";
|
||||
@@ -76,6 +85,8 @@ export const api = {
|
||||
renameSession: (sessionId: number, title: string) =>
|
||||
request<ChatSession>("/chat/session/title", { method: "PUT", body: JSON.stringify({ sessionId, title }) }),
|
||||
deleteSession: (sessionId: number) => request<null>(`/chat/session/${sessionId}`, { method: "DELETE" }),
|
||||
finishTopic: (sessionId: number) => request<FinishTopicResult>(`/chat/session/${sessionId}/topic/finish`, { method: "POST", body: JSON.stringify({}) }),
|
||||
growthProfile: () => request<GrowthProfileResult>("/user/growth-profile"),
|
||||
stop: (sessionId: number) => request<null>("/chat/stop", { method: "POST", body: JSON.stringify({ sessionId }) }),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user