Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
eda157e3
Commit
eda157e3
authored
Mar 31, 2024
by
Timothy J. Baek
Browse files
fix: openai issue
parent
653a0ff0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
src/routes/(app)/+page.svelte
src/routes/(app)/+page.svelte
+5
-5
src/routes/(app)/c/[id]/+page.svelte
src/routes/(app)/c/[id]/+page.svelte
+5
-5
No files found.
src/routes/(app)/+page.svelte
View file @
eda157e3
...
@@ -520,11 +520,6 @@
...
@@ -520,11 +520,6 @@
const
sendPromptOpenAI
=
async
(
model
,
userPrompt
,
responseMessageId
,
_chatId
)
=>
{
const
sendPromptOpenAI
=
async
(
model
,
userPrompt
,
responseMessageId
,
_chatId
)
=>
{
const
responseMessage
=
history
.
messages
[
responseMessageId
];
const
responseMessage
=
history
.
messages
[
responseMessageId
];
//
Wait
until
history
/
message
have
been
updated
await
tick
();
scrollToBottom
();
const
docs
=
messages
const
docs
=
messages
.
filter
((
message
)
=>
message
?.
files
??
null
)
.
filter
((
message
)
=>
message
?.
files
??
null
)
.
map
((
message
)
=>
.
map
((
message
)
=>
...
@@ -593,6 +588,11 @@
...
@@ -593,6 +588,11 @@
:
`${
OPENAI_API_BASE_URL
}`
:
`${
OPENAI_API_BASE_URL
}`
);
);
//
Wait
until
history
/
message
have
been
updated
await
tick
();
scrollToBottom
();
if
(
res
&&
res
.
ok
)
{
if
(
res
&&
res
.
ok
)
{
const
reader
=
res
.
body
const
reader
=
res
.
body
.
pipeThrough
(
new
TextDecoderStream
())
.
pipeThrough
(
new
TextDecoderStream
())
...
...
src/routes/(app)/c/[id]/+page.svelte
View file @
eda157e3
...
@@ -536,11 +536,6 @@
...
@@ -536,11 +536,6 @@
const
sendPromptOpenAI
=
async
(
model
,
userPrompt
,
responseMessageId
,
_chatId
)
=>
{
const
sendPromptOpenAI
=
async
(
model
,
userPrompt
,
responseMessageId
,
_chatId
)
=>
{
const
responseMessage
=
history
.
messages
[
responseMessageId
];
const
responseMessage
=
history
.
messages
[
responseMessageId
];
//
Wait
until
history
/
message
have
been
updated
await
tick
();
scrollToBottom
();
const
docs
=
messages
const
docs
=
messages
.
filter
((
message
)
=>
message
?.
files
??
null
)
.
filter
((
message
)
=>
message
?.
files
??
null
)
.
map
((
message
)
=>
.
map
((
message
)
=>
...
@@ -607,6 +602,11 @@
...
@@ -607,6 +602,11 @@
:
`${
OPENAI_API_BASE_URL
}`
:
`${
OPENAI_API_BASE_URL
}`
);
);
//
Wait
until
history
/
message
have
been
updated
await
tick
();
scrollToBottom
();
if
(
res
&&
res
.
ok
)
{
if
(
res
&&
res
.
ok
)
{
const
reader
=
res
.
body
const
reader
=
res
.
body
.
pipeThrough
(
new
TextDecoderStream
())
.
pipeThrough
(
new
TextDecoderStream
())
...
...
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