Spaces:
Sleeping
Sleeping
Added a system message to the chat completion request.
Browse files
src/lib/components/Playground/Playground.svelte
CHANGED
|
@@ -65,7 +65,10 @@
|
|
| 65 |
|
| 66 |
for await (const chunk of hf.chatCompletionStream({
|
| 67 |
model: currentModel,
|
| 68 |
-
messages:
|
|
|
|
|
|
|
|
|
|
| 69 |
temperature: temperature,
|
| 70 |
max_tokens: maxTokens
|
| 71 |
})) {
|
|
|
|
| 65 |
|
| 66 |
for await (const chunk of hf.chatCompletionStream({
|
| 67 |
model: currentModel,
|
| 68 |
+
messages: [
|
| 69 |
+
systemMessage,
|
| 70 |
+
...messages.map(({ role, content }) => ({ role, content }))
|
| 71 |
+
],
|
| 72 |
temperature: temperature,
|
| 73 |
max_tokens: maxTokens
|
| 74 |
})) {
|