mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-30 17:05:16 -05:00
fix: model list refreshes, file uploads and transcriptions write debug lines at INFO (#35316)
Everyday requests left internal debug lines in the server log at the default INFO level: one for every OpenAI and Ollama model list refresh, one per file upload and HTML file view, and the transcription debug lines of each speech-to-text request, one of them printed straight to stdout. They now log at DEBUG, so they only show up when LOG_LEVEL is set to DEBUG. Fixes #35315
This commit is contained in:
1 parent
e8839502dc
commit
4d903e1ec0
4 files changed
+7
-7
No files matched your search
@@ -1343,7 +1343,7 @@ async def _transcribe_mistral(request, file_path, filename, metadata, file_dir,
|
||||
|
||||
|
||||
async def transcribe(request: Request, file_path: str, metadata: Optional[dict] = None, user=None):
|
||||
log.info('transcribe: %s %s', file_path, metadata)
|
||||
log.debug('transcribe: %s %s', file_path, metadata)
|
||||
|
||||
if BYPASS_PYDUB_PREPROCESSING:
|
||||
log.info('Bypassing pydub preprocessing (BYPASS_PYDUB_PREPROCESSING=true)')
|
||||
@@ -1365,7 +1365,7 @@ async def transcribe(request: Request, file_path: str, metadata: Optional[dict]
|
||||
# Always produce a list of chunk paths (could be one entry if small)
|
||||
try:
|
||||
chunk_paths = await asyncio.to_thread(split_audio, file_path, MAX_FILE_SIZE)
|
||||
print(f'Chunk paths: {chunk_paths}')
|
||||
log.debug('Chunk paths: %s', chunk_paths)
|
||||
except Exception as e:
|
||||
log.exception(e)
|
||||
raise HTTPException(
|
||||
@@ -1470,7 +1470,7 @@ async def transcription(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail=ERROR_MESSAGES.ACCESS_PROHIBITED,
|
||||
)
|
||||
log.info('file.content_type: %s', file.content_type)
|
||||
log.debug('file.content_type: %s', file.content_type)
|
||||
stt_supported_content_types = await Config.get('audio.stt.supported_content_types', [])
|
||||
|
||||
if not strict_match_mime_type(stt_supported_content_types, file.content_type):
|
||||
|
||||
@@ -347,7 +347,7 @@ async def upload_file_handler(
|
||||
background_tasks: Optional[BackgroundTasks] = None,
|
||||
db: Optional[AsyncSession] = None,
|
||||
):
|
||||
log.info('file.content_type: %s %s', file.content_type, process)
|
||||
log.debug('file.content_type: %s %s', file.content_type, process)
|
||||
|
||||
if isinstance(metadata, str):
|
||||
try:
|
||||
@@ -931,7 +931,7 @@ async def get_html_file_content_by_id(
|
||||
|
||||
# Check if the file already exists in the cache
|
||||
if file_path.is_file():
|
||||
log.info('file_path: %s', file_path)
|
||||
log.debug('file_path: %s', file_path)
|
||||
return FileResponse(file_path)
|
||||
else:
|
||||
raise HTTPException(
|
||||
|
||||
@@ -379,7 +379,7 @@ async def get_ollama_connection_config() -> tuple[list, dict]:
|
||||
)
|
||||
async def get_all_models(request: Request, user: UserModel | None = None):
|
||||
"""Aggregate model tags from every enabled Ollama backend."""
|
||||
log.info('get_all_models()')
|
||||
log.debug('get_all_models()')
|
||||
|
||||
if not await Config.get('ollama.enable'):
|
||||
models_dict: dict = {'models': []}
|
||||
|
||||
@@ -760,7 +760,7 @@ async def get_filtered_models(models, user, db=None):
|
||||
key_builder=lambda _func, request, user=None: f'openai_all_models_{user.id}' if user else 'openai_all_models',
|
||||
)
|
||||
async def get_all_models(request: Request, user: UserModel) -> dict[str, list]:
|
||||
log.info('get_all_models()')
|
||||
log.debug('get_all_models()')
|
||||
|
||||
enable_openai_api, api_base_urls, _, api_configs = await get_openai_runtime_config()
|
||||
if not enable_openai_api:
|
||||
|
||||
Reference in new issue
Block a user