Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
24319fe8
authored
May 30, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: quote len
parent
87c5cb6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
src/api/fetch.ts
+1
-1
src/pages/chat/index.tsx
+1
-3
No files found.
src/api/fetch.ts
View file @
24319fe8
...
@@ -50,7 +50,7 @@ export const streamFetch = ({ url, data, onMessage, abortSignal }: StreamFetchPr
...
@@ -50,7 +50,7 @@ export const streamFetch = ({ url, data, onMessage, abortSignal }: StreamFetchPr
read
();
read
();
}
catch
(
err
:
any
)
{
}
catch
(
err
:
any
)
{
if
(
err
?.
message
===
'The user aborted a request.'
)
{
if
(
err
?.
message
===
'The user aborted a request.'
)
{
return
resolve
({
responseText
,
newChatId
,
quoteLen
:
0
,
systemPrompt
:
''
});
return
resolve
({
responseText
,
newChatId
,
quoteLen
,
systemPrompt
:
''
});
}
}
reject
(
typeof
err
===
'string'
?
err
:
err
?.
message
||
'请求异常'
);
reject
(
typeof
err
===
'string'
?
err
:
err
?.
message
||
'请求异常'
);
}
}
...
...
src/pages/chat/index.tsx
View file @
24319fe8
...
@@ -211,8 +211,6 @@ const Chat = ({ modelId, chatId }: { modelId: string; chatId: string }) => {
...
@@ -211,8 +211,6 @@ const Chat = ({ modelId, chatId }: { modelId: string; chatId: string }) => {
router
.
replace
(
`/chat?modelId=
${
modelId
}
&chatId=
${
newChatId
}
`
);
router
.
replace
(
`/chat?modelId=
${
modelId
}
&chatId=
${
newChatId
}
`
);
}
}
abortSignal
.
signal
.
aborted
&&
(
await
delay
(
600
));
// 设置聊天内容为完成状态
// 设置聊天内容为完成状态
setChatData
((
state
)
=>
({
setChatData
((
state
)
=>
({
...
state
,
...
state
,
...
@@ -229,9 +227,9 @@ const Chat = ({ modelId, chatId }: { modelId: string; chatId: string }) => {
...
@@ -229,9 +227,9 @@ const Chat = ({ modelId, chatId }: { modelId: string; chatId: string }) => {
}));
}));
// refresh data
// refresh data
generatingMessage
();
loadHistory
({
pageNum
:
1
,
init
:
true
});
loadHistory
({
pageNum
:
1
,
init
:
true
});
loadMyModels
(
true
);
loadMyModels
(
true
);
generatingMessage
();
},
},
[
[
chatId
,
chatId
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment