From fc92830006aa148fe77e3416a31385fa73d71479 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Mon, 30 Sep 2024 11:56:21 +0200 Subject: [PATCH] Update lollms_tti.js --- endpoints/libraries/lollms_tti.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/endpoints/libraries/lollms_tti.js b/endpoints/libraries/lollms_tti.js index a33750f1..f40e1252 100644 --- a/endpoints/libraries/lollms_tti.js +++ b/endpoints/libraries/lollms_tti.js @@ -6,7 +6,12 @@ class LollmsTTI { setBaseUrl(baseUrl){ this.baseUrl = baseUrl; } - + updateSettings(settings) { + // Update each setting if it's provided in the settings object + if ('host_address' in settings) this.baseUrl = settings.host_address; + if ('baseUrl' in settings) this.baseUrl = settings.baseUrl; + } + async generateImage(prompt, negativePrompt = '', width = 512, height = 512) { const url = `${this.baseUrl}/generate_image`; const requestBody = {