changed custom function calls folder

This commit is contained in:
Saifeddine ALOUI 2025-02-19 21:54:07 +01:00
parent d13e7f8070
commit 3fa30ab47e
2 changed files with 5 additions and 6 deletions

View File

@ -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():

View File

@ -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}