Spaces:
Runtime error
Runtime error
fix missing sep
Browse files
src/lib/components/InferencePlayground/InferencePlaygroundCodeSnippets.svelte
CHANGED
|
@@ -83,7 +83,7 @@ let out = "";
|
|
| 83 |
|
| 84 |
for await (const chunk of inference.chatCompletionStream({
|
| 85 |
model: "${conversation.model.id}",
|
| 86 |
-
messages: ${formattedMessages({ sep: '
|
| 87 |
${formattedConfig({ sep: ',\n ', start: '', end: '' })},
|
| 88 |
seed: 0,
|
| 89 |
})) {
|
|
@@ -105,7 +105,7 @@ const inference = new HfInference("your access token")
|
|
| 105 |
|
| 106 |
const out = await inference.chatCompletion({
|
| 107 |
model: "${conversation.model.id}",
|
| 108 |
-
messages: ${formattedMessages({ sep: '
|
| 109 |
${formattedConfig({ sep: ',\n ', start: '', end: '' })},
|
| 110 |
seed: 0,
|
| 111 |
});
|
|
|
|
| 83 |
|
| 84 |
for await (const chunk of inference.chatCompletionStream({
|
| 85 |
model: "${conversation.model.id}",
|
| 86 |
+
messages: ${formattedMessages({ sep: ',\n ', start: '[\n ', end: '\n ]' })},
|
| 87 |
${formattedConfig({ sep: ',\n ', start: '', end: '' })},
|
| 88 |
seed: 0,
|
| 89 |
})) {
|
|
|
|
| 105 |
|
| 106 |
const out = await inference.chatCompletion({
|
| 107 |
model: "${conversation.model.id}",
|
| 108 |
+
messages: ${formattedMessages({ sep: ',\n ', start: '[\n ', end: '\n ]' })},
|
| 109 |
${formattedConfig({ sep: ',\n ', start: '', end: '' })},
|
| 110 |
seed: 0,
|
| 111 |
});
|