|
@@ -119,8 +119,6 @@ from config import (
|
|
WEBUI_SESSION_COOKIE_SAME_SITE,
|
|
WEBUI_SESSION_COOKIE_SAME_SITE,
|
|
WEBUI_SESSION_COOKIE_SECURE,
|
|
WEBUI_SESSION_COOKIE_SECURE,
|
|
ENABLE_ADMIN_CHAT_ACCESS,
|
|
ENABLE_ADMIN_CHAT_ACCESS,
|
|
- ENABLE_TOOLS_FILTER,
|
|
|
|
- ENABLE_FILES_FILTER,
|
|
|
|
AppConfig,
|
|
AppConfig,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -372,10 +370,6 @@ async def get_content_from_response(response) -> Optional[str]:
|
|
async def chat_completion_tools_handler(
|
|
async def chat_completion_tools_handler(
|
|
body: dict, user: UserModel, extra_params: dict
|
|
body: dict, user: UserModel, extra_params: dict
|
|
) -> tuple[dict, dict]:
|
|
) -> tuple[dict, dict]:
|
|
- log.debug(f"{ENABLE_TOOLS_FILTER=}")
|
|
|
|
- if not ENABLE_TOOLS_FILTER:
|
|
|
|
- return body, {}
|
|
|
|
-
|
|
|
|
# If tool_ids field is present, call the functions
|
|
# If tool_ids field is present, call the functions
|
|
tool_ids = body.pop("tool_ids", None)
|
|
tool_ids = body.pop("tool_ids", None)
|
|
if not tool_ids:
|
|
if not tool_ids:
|
|
@@ -467,10 +461,6 @@ async def chat_completion_tools_handler(
|
|
|
|
|
|
|
|
|
|
async def chat_completion_files_handler(body) -> tuple[dict, dict[str, list]]:
|
|
async def chat_completion_files_handler(body) -> tuple[dict, dict[str, list]]:
|
|
- log.debug(f"{ENABLE_FILES_FILTER=}")
|
|
|
|
- if not ENABLE_FILES_FILTER:
|
|
|
|
- return body, {}
|
|
|
|
-
|
|
|
|
contexts = []
|
|
contexts = []
|
|
citations = []
|
|
citations = []
|
|
|
|
|