We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d82d1c commit e22cb09Copy full SHA for e22cb09
AiServer/wwwroot/mjs/components/Chat.mjs
@@ -177,10 +177,10 @@ export default {
177
nextTick(scrollBottom)
178
179
const msgs = Array.from(thread.value?.messages ?? [])
180
- msgs.push({ role: "user", content: prefs.value.userContent })
+ msgs.push({ role: "user", content: prefs.value.userContent?.trim() })
181
182
if (!msgs.find(x => x.role === 'system') && systemPrompt.value) {
183
- msgs.unshift({ role: "system", content: systemPrompt.value })
+ msgs.unshift({ role: "system", content: systemPrompt.value.trim() })
184
}
185
186
const request = new OpenAiChatCompletion({
0 commit comments