From ce66dde135743abf935676c431bf12cd3dad6327 Mon Sep 17 00:00:00 2001 From: Jason Schleifer Date: Wed, 21 Aug 2024 04:38:01 +1200 Subject: [PATCH 1/4] removed default query for models --- nodes/config/gtUILMStudioStructureConfig.py | 4 ---- nodes/drivers/gtUILMStudioChatPromptDriver.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/nodes/config/gtUILMStudioStructureConfig.py b/nodes/config/gtUILMStudioStructureConfig.py index 851b961..3d0e84b 100644 --- a/nodes/config/gtUILMStudioStructureConfig.py +++ b/nodes/config/gtUILMStudioStructureConfig.py @@ -7,14 +7,10 @@ OpenAiChatPromptDriver, ) -from ..utilities import get_models from .gtUIBaseConfig import gtUIBaseConfig lmstudio_port = "1234" lmstudio_base_url = "http://127.0.0.1" -lmstudio_models = get_models("lmstudio", lmstudio_base_url, lmstudio_port) -if len(lmstudio_models) == 0: - lmstudio_models.append("") class gtUILMStudioStructureConfig(gtUIBaseConfig): diff --git a/nodes/drivers/gtUILMStudioChatPromptDriver.py b/nodes/drivers/gtUILMStudioChatPromptDriver.py index f654a2b..b0663b6 100644 --- a/nodes/drivers/gtUILMStudioChatPromptDriver.py +++ b/nodes/drivers/gtUILMStudioChatPromptDriver.py @@ -1,14 +1,10 @@ from griptape.drivers import OpenAiChatPromptDriver -from ..utilities import get_models from .gtUIBasePromptDriver import gtUIBasePromptDriver default_port = "1234" default_base_url = "http://127.0.0.1" DEFAULT_API_KEY = "lm_studio" -models = get_models("lmstudio", default_base_url, default_port) -if len(models) == 0: - models.append("") class gtUILMStudioChatPromptDriver(gtUIBasePromptDriver): From d5adf65a1b7f7a030bfa2331af2a5eb47e2b51e5 Mon Sep 17 00:00:00 2001 From: Jason Schleifer Date: Wed, 21 Aug 2024 04:38:14 +1200 Subject: [PATCH 2/4] removed unneded import --- __init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/__init__.py b/__init__.py index 81e1064..53451a3 100644 --- a/__init__.py +++ b/__init__.py @@ -185,7 +185,6 @@ # RULES from .nodes.rules.gtUIRule import gtUIRule -from .nodes.Separator import Separator # TASKS # - Audio From 52d310ea3166eb7c4fbe5fbbab7a8a74298fedfa Mon Sep 17 00:00:00 2001 From: Jason Schleifer Date: Wed, 21 Aug 2024 04:40:52 +1200 Subject: [PATCH 3/4] removed unused query for models --- nodes/config/gtUIOllamaStructureConfig.py | 3 --- nodes/drivers/gtUIOllamaEmbeddingDriver.py | 4 ---- nodes/drivers/gtUIOllamaPromptDriver.py | 4 ---- 3 files changed, 11 deletions(-) diff --git a/nodes/config/gtUIOllamaStructureConfig.py b/nodes/config/gtUIOllamaStructureConfig.py index e17652b..9dd2be9 100644 --- a/nodes/config/gtUIOllamaStructureConfig.py +++ b/nodes/config/gtUIOllamaStructureConfig.py @@ -7,13 +7,10 @@ OllamaPromptDriver, ) -from ..utilities import get_models from .gtUIBaseConfig import gtUIBaseConfig ollama_port = "11434" ollama_base_url = "http://127.0.0.1" -ollama_models = get_models("ollama", ollama_base_url, ollama_port) -ollama_models.append("") class gtUIOllamaStructureConfig(gtUIBaseConfig): diff --git a/nodes/drivers/gtUIOllamaEmbeddingDriver.py b/nodes/drivers/gtUIOllamaEmbeddingDriver.py index 6146030..9640a07 100644 --- a/nodes/drivers/gtUIOllamaEmbeddingDriver.py +++ b/nodes/drivers/gtUIOllamaEmbeddingDriver.py @@ -1,13 +1,9 @@ from griptape.drivers import OllamaEmbeddingDriver -from ..utilities import get_models from .gtUIBaseEmbeddingDriver import gtUIBaseEmbeddingDriver default_port = "11434" default_base_url = "http://127.0.0.1" -models = get_models("ollama", default_base_url, default_port) -if len(models) == 0: - models.append("") class gtUIOllamaEmbeddingDriver(gtUIBaseEmbeddingDriver): diff --git a/nodes/drivers/gtUIOllamaPromptDriver.py b/nodes/drivers/gtUIOllamaPromptDriver.py index 1ca493d..352b1d8 100644 --- a/nodes/drivers/gtUIOllamaPromptDriver.py +++ b/nodes/drivers/gtUIOllamaPromptDriver.py @@ -1,13 +1,9 @@ from griptape.drivers import OllamaPromptDriver -from ..utilities import get_models from .gtUIBasePromptDriver import gtUIBasePromptDriver default_port = "11434" default_base_url = "http://127.0.0.1" -models = get_models("ollama", default_base_url, default_port) -if len(models) == 0: - models.append("") class gtUIOllamaPromptDriver(gtUIBasePromptDriver): From f5a8a22e95281c8b3ff823f86f50f6006445e208 Mon Sep 17 00:00:00 2001 From: Jason Schleifer Date: Wed, 21 Aug 2024 04:41:39 +1200 Subject: [PATCH 4/4] updated readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8df8d4a..ff724d1 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,9 @@ You can previous and download more examples [here](examples/README.md). ## Recent Changelog +### Aug 21, 2024 +* Fixed querying for models in LMStudio and Ollama on import + ### Aug 20, 2024 * Update Griptape Framework to v029.2 * Modified ImageQueryTask to switch to a workflow if more than 2 images are specified