From 3fa30ab47ea30cb23f975207b6d340ca8eab8d49 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 19 Feb 2025 21:54:07 +0100 Subject: [PATCH] changed custom function calls folder --- lollms/paths.py | 5 ++--- lollms/server/endpoints/lollms_function_calls.py | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lollms/paths.py b/lollms/paths.py index 5d841aa..1d3f65a 100644 --- a/lollms/paths.py +++ b/lollms/paths.py @@ -82,7 +82,6 @@ class LollmsPaths: self.personal_ttm_services_path = self.personal_services_path / "ttm" self.apps_zoo_path = self.personal_path / "apps_zoo" - self.custom_functions_zoo_path = self.personal_path / "functions_zoo" @@ -90,7 +89,7 @@ class LollmsPaths: self.gptqlora_path = self.personal_trainers_path / "gptqlora" self.custom_personalities_path = self.personal_path / "custom_personalities" - self.custom_function_calls_path = self.personal_path / "custom_function_calls" + self.custom_function_calls_path = self.personal_path / "custom_function_calls" self.custom_voices_path = self.personal_path / "custom_voices" self.binding_models_paths = [] @@ -273,7 +272,7 @@ class LollmsPaths: self.custom_voices_path.mkdir(parents=True, exist_ok=True) self.apps_zoo_path.mkdir(parents=True, exist_ok=True) - self.custom_functions_zoo_path.mkdir(parents=True, exist_ok=True) + self.custom_function_calls_path.mkdir(parents=True, exist_ok=True) if not self.bindings_zoo_path.exists(): diff --git a/lollms/server/endpoints/lollms_function_calls.py b/lollms/server/endpoints/lollms_function_calls.py index 1293838..d5084d1 100644 --- a/lollms/server/endpoints/lollms_function_calls.py +++ b/lollms/server/endpoints/lollms_function_calls.py @@ -47,7 +47,7 @@ from pathlib import Path async def list_function_calls(): """List all available function calls in the functions zoo and custom functions zoo""" functions_zoo_path = lollmsElfServer.lollms_paths.functions_zoo_path - custom_functions_zoo_path = lollmsElfServer.lollms_paths.custom_functions_zoo_path + custom_function_calls_path = lollmsElfServer.lollms_paths.custom_function_calls_path function_calls = [] # Helper function to process a directory and append function calls @@ -109,8 +109,8 @@ async def list_function_calls(): process_directory(category_dir, category_dir.name) # Process the custom functions zoo under the "custom" category - if custom_functions_zoo_path.exists(): - process_directory(custom_functions_zoo_path, "custom") + if custom_function_calls_path.exists(): + process_directory(custom_function_calls_path, "custom") return {"function_calls": function_calls}