feat: 前后端统一接口类型

This commit is contained in:
ChenZhaoYu committed 2023-02-13 15:54:17 +08:00
1 parent dd522eb404
commit 847623e22a
12 files changed
+167 -78

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { post } from '@/utils/request'
export function fetchChatAPI<T = any>(prompt: string) {
return post<T>({
url: '/chat',
data: { prompt },
})
}
export function clearConversations<T = any>() {
return post<T>({
url: '/clear',
})
}