Fix stream issue and netlify config (#13)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "patch",
|
||||
"comment": "fix stream event and netlify build",
|
||||
"packageName": "@zhishuyun/hub",
|
||||
"email": "cqc@cuiqingcai.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
[build]
|
||||
command = "vite build"
|
||||
command = "vite build --mode=development"
|
||||
functions = "netlify/functions"
|
||||
publish = "dist"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class ChatOperator {
|
||||
},
|
||||
baseURL: options.endpoint,
|
||||
responseType: 'stream',
|
||||
onDownloadProgress: (event: AxiosProgressEvent) => {
|
||||
onDownloadProgress: ({ event }: AxiosProgressEvent) => {
|
||||
const response = event.target.response;
|
||||
const lines = response.split('\r\n').filter((line: string) => !!line);
|
||||
const lastLine = lines[lines.length - 1];
|
||||
|
||||
Reference in New Issue
Block a user