Console log Ollama model pulls

3b9fcfae60ddd54612801a9065538d28ac49ee1a

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -0Ignore whitespace
src/endpoints/backends/text-completions.js+2 -0
@@ -438,6 +438,7 @@ ollama.post('/download', jsonParser, async function (request, response) {
438438
439 const name = request.body.name;439 const name = request.body.name;
440 const url = String(request.body.api_server).replace(/\/$/, '');440 const url = String(request.body.api_server).replace(/\/$/, '');
441 console.debug('Pulling Ollama model:', name);
441442
442 const fetchResponse = await fetch(`${url}/api/pull`, {443 const fetchResponse = await fetch(`${url}/api/pull`, {
443 method: 'POST',444 method: 'POST',
@@ -453,6 +454,7 @@ ollama.post('/download', jsonParser, async function (request, response) {
453 return response.status(fetchResponse.status).send({ error: true });454 return response.status(fetchResponse.status).send({ error: true });
454 }455 }
455456
457 console.debug('Ollama pull response:', await fetchResponse.json());
456 return response.send({ ok: true });458 return response.send({ ok: true });
457 } catch (error) {459 } catch (error) {
458 console.error(error);460 console.error(error);