feat: v2.7.2 消息样式美化和优化代码 (#111)

* perf: 优化代码

* feat: 美化消息,支持 markdown 全语法

* chore: version 2.7.2
This commit is contained in:
Redon
2023-02-24 15:03:49 +08:00
committed by GitHub
parent 1e2f893ef6
commit b6fd9ae766
14 changed files with 65 additions and 130 deletions

View File

@@ -1,4 +1,4 @@
import type { AxiosProgressEvent, GenericAbortSignal } from 'axios'
import type { GenericAbortSignal } from 'axios'
import { post } from '@/utils/request'
export function fetchChatAPI<T = any>(
@@ -13,22 +13,6 @@ export function fetchChatAPI<T = any>(
})
}
/** 实验性质的函数,用于处理聊天过程中的中间结果 */
export function fetchChatAPIProcess<T = any>(
params: {
prompt: string
options?: { conversationId?: string; parentMessageId?: string }
signal?: GenericAbortSignal
onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void },
) {
return post<T>({
url: '/chat-process',
data: { prompt: params.prompt, options: params.options },
signal: params.signal,
onDownloadProgress: params.onDownloadProgress,
})
}
export function fetchChatConfig<T = any>() {
return post<T>({
url: '/config',