mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-02-28 20:05:51 +00:00
upgraded endpoint
This commit is contained in:
parent
3fa30ab47e
commit
60cd1c2870
@ -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")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user