Skip to content

Commit

Permalink
Fix stream issue and netlify config (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
崔庆才丨静觅 authored Jan 1, 2024
1 parent 488698a commit 5429cf6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix stream event and netlify build",
"packageName": "@zhishuyun/hub",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build]
command = "vite build"
command = "vite build --mode=development"
functions = "netlify/functions"
publish = "dist"

Expand Down
2 changes: 1 addition & 1 deletion src/operators/chat/operator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 5429cf6

Please sign in to comment.