mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Console log Ollama model pulls
This commit is contained in:
@@ -438,6 +438,7 @@ ollama.post('/download', jsonParser, async function (request, response) {
|
|||||||
|
|
||||||
const name = request.body.name;
|
const name = request.body.name;
|
||||||
const url = String(request.body.api_server).replace(/\/$/, '');
|
const url = String(request.body.api_server).replace(/\/$/, '');
|
||||||
|
console.debug('Pulling Ollama model:', name);
|
||||||
|
|
||||||
const fetchResponse = await fetch(`${url}/api/pull`, {
|
const fetchResponse = await fetch(`${url}/api/pull`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -453,6 +454,7 @@ ollama.post('/download', jsonParser, async function (request, response) {
|
|||||||
return response.status(fetchResponse.status).send({ error: true });
|
return response.status(fetchResponse.status).send({ error: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.debug('Ollama pull response:', await fetchResponse.json());
|
||||||
return response.send({ ok: true });
|
return response.send({ ok: true });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
Reference in New Issue
Block a user