Don't log when no endpoint available. Remove pointless header
| @@ -237,7 +237,7 @@ router.post('/props', jsonParser, async function (request, response) { | |||
| 237 | try { | 237 | try { |
| 238 | const baseUrl = trimV1(request.body.api_server); | 238 | const baseUrl = trimV1(request.body.api_server); |
| 239 | const args = { | 239 | const args = { |
| 240 | headers: { 'Content-Type': 'application/json' }, | 240 | headers: {}, |
| 241 | }; | 241 | }; |
| 242 | 242 | ||
| 243 | setAdditionalHeaders(request, args, baseUrl); | 243 | setAdditionalHeaders(request, args, baseUrl); |
| @@ -247,7 +247,6 @@ router.post('/props', jsonParser, async function (request, response) { | |||
| 247 | const propsReply = await fetch(propsUrl, args); | 247 | const propsReply = await fetch(propsUrl, args); |
| 248 | 248 | ||
| 249 | if (!propsReply.ok) { | 249 | if (!propsReply.ok) { |
| 250 | console.log('Properties endpoint is offline.'); | ||
| 251 | return response.status(400); | 250 | return response.status(400); |
| 252 | } | 251 | } |
| 253 | 252 | ||
| @@ -258,7 +257,7 @@ router.post('/props', jsonParser, async function (request, response) { | |||
| 258 | props['chat_template'] = props['chat_template'].slice(0, -1) + '\n'; | 257 | props['chat_template'] = props['chat_template'].slice(0, -1) + '\n'; |
| 259 | } | 258 | } |
| 260 | props['chat_template_hash'] = createHash('sha256').update(props['chat_template']).digest('hex'); | 259 | props['chat_template_hash'] = createHash('sha256').update(props['chat_template']).digest('hex'); |
| 261 | console.log(`We have props: ${JSON.stringify(props)}`); | 260 | console.log(`Model properties: ${JSON.stringify(props)}`); |
| 262 | return response.send(props); | 261 | return response.send(props); |
| 263 | } catch (error) { | 262 | } catch (error) { |
| 264 | console.error(error); | 263 | console.error(error); |