Spaces:
Paused
Paused
Update server.js
Browse files
server.js
CHANGED
|
@@ -16,8 +16,8 @@ app.post('/chat', async (req, res) => {
|
|
| 16 |
const response = await axios.post('https://api-inference.huggingface.co/models/codellama/CodeLlama-34b-Instruct-hf', {
|
| 17 |
inputs: inputText,
|
| 18 |
parameters: {
|
| 19 |
-
temperature: temperature || 0.7,
|
| 20 |
-
max_new_tokens: max_tokens || 100
|
| 21 |
}
|
| 22 |
}, {
|
| 23 |
headers: {
|
|
|
|
| 16 |
const response = await axios.post('https://api-inference.huggingface.co/models/codellama/CodeLlama-34b-Instruct-hf', {
|
| 17 |
inputs: inputText,
|
| 18 |
parameters: {
|
| 19 |
+
temperature: parseFloat(temperature) || 0.7,
|
| 20 |
+
max_new_tokens: parseInt(max_tokens) || 100
|
| 21 |
}
|
| 22 |
}, {
|
| 23 |
headers: {
|