From 60cd1c2870154d4944d4cb2056c5de5b9cd6cd1a Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Thu, 20 Feb 2025 00:53:53 +0100 Subject: [PATCH] upgraded endpoint --- lollms/server/endpoints/lollms_function_calls.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lollms/server/endpoints/lollms_function_calls.py b/lollms/server/endpoints/lollms_function_calls.py index d5084d1..54d6308 100644 --- a/lollms/server/endpoints/lollms_function_calls.py +++ b/lollms/server/endpoints/lollms_function_calls.py @@ -132,7 +132,10 @@ async def mount_function_call(request: Request): raise HTTPException(status_code=403, detail="Access denied") # Validate function exists - fn_dir = lollmsElfServer.lollms_paths.functions_zoo_path / function_category / function_name + if function_category!="custom": + fn_dir = lollmsElfServer.lollms_paths.functions_zoo_path / function_category / function_name + else: + fn_dir = lollmsElfServer.lollms_paths.custom_function_calls_path / function_name if not fn_dir.exists() or not (fn_dir / "config.yaml").exists() or not (fn_dir / "function.py").exists(): raise HTTPException(status_code=404, detail="Function not found")