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
2972774d
"include/vscode:/vscode.git/clone" did not exist on "00c1016e4979b2c121bf76ff20d4c2b7c29845a1"
Commit
2972774d
authored
Jun 10, 2024
by
Timothy J. Baek
Browse files
refac
parent
64b6a8c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/lib/components/chat/Chat.svelte
src/lib/components/chat/Chat.svelte
+4
-4
No files found.
src/lib/components/chat/Chat.svelte
View file @
2972774d
...
@@ -327,6 +327,9 @@
...
@@ -327,6 +327,9 @@
chatTextAreaElement.style.height = '';
chatTextAreaElement.style.height = '';
}
}
const _files = JSON.parse(JSON.stringify(files));
files = [];
prompt = '';
prompt = '';
// Create user message
// Create user message
...
@@ -338,7 +341,7 @@
...
@@ -338,7 +341,7 @@
role: 'user',
role: 'user',
user: _user ?? undefined,
user: _user ?? undefined,
content: userPrompt,
content: userPrompt,
files: files.length > 0 ? files : undefined,
files:
_
files.length > 0 ?
_
files : undefined,
timestamp: Math.floor(Date.now() / 1000), // Unix epoch
timestamp: Math.floor(Date.now() / 1000), // Unix epoch
models: selectedModels.filter((m, mIdx) => selectedModels.indexOf(m) === mIdx)
models: selectedModels.filter((m, mIdx) => selectedModels.indexOf(m) === mIdx)
};
};
...
@@ -378,9 +381,6 @@
...
@@ -378,9 +381,6 @@
}
}
await tick();
await tick();
}
}
files = [];
// Send prompt
// Send prompt
_responses = await sendPrompt(userPrompt, userMessageId);
_responses = await sendPrompt(userPrompt, userMessageId);
}
}
...
...
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