mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 00:59:52 +00:00
import error?
This commit is contained in:
parent
13c03bfd7d
commit
a933319adb
@ -14,6 +14,7 @@ import requests
|
|||||||
import mimetypes
|
import mimetypes
|
||||||
import shutil
|
import shutil
|
||||||
import inspect
|
import inspect
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from fastapi import FastAPI, Request, Depends, status, UploadFile, File, Form
|
from fastapi import FastAPI, Request, Depends, status, UploadFile, File, Form
|
||||||
from fastapi.staticfiles import StaticFiles
|
from fastapi.staticfiles import StaticFiles
|
||||||
@ -375,15 +376,16 @@ async def chat_completion_tools_handler(
|
|||||||
if not ENABLE_TOOLS_FILTER:
|
if not ENABLE_TOOLS_FILTER:
|
||||||
return body, {}
|
return body, {}
|
||||||
|
|
||||||
|
# If tool_ids field is present, call the functions
|
||||||
|
tool_ids = body.pop("tool_ids", None)
|
||||||
|
if not tool_ids:
|
||||||
|
return body, {}
|
||||||
|
|
||||||
skip_files = False
|
skip_files = False
|
||||||
contexts = []
|
contexts = []
|
||||||
citations = []
|
citations = []
|
||||||
|
|
||||||
task_model_id = get_task_model_id(body["model"])
|
task_model_id = get_task_model_id(body["model"])
|
||||||
# If tool_ids field is present, call the functions
|
|
||||||
tool_ids = body.pop("tool_ids", None)
|
|
||||||
if not tool_ids:
|
|
||||||
return body, {}
|
|
||||||
|
|
||||||
log.debug(f"{tool_ids=}")
|
log.debug(f"{tool_ids=}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user