Skip to content

Commit 96fdb83

Browse files
committed
use logger warning
1 parent 81bc340 commit 96fdb83

File tree

1 file changed

+3
-1
lines changed
  • templates/types/streaming/fastapi/app/api/routers

1 file changed

+3
-1
lines changed

templates/types/streaming/fastapi/app/api/routers/chat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import logging
23
from pydantic import BaseModel
34
from typing import List, Any, Optional, Dict, Tuple
45
from fastapi import APIRouter, Depends, HTTPException, Request, status
@@ -50,7 +51,8 @@ def from_source_node(cls, source_node: NodeWithScore):
5051
file_name = metadata.get("file_name")
5152
url_prefix = os.getenv("FILESERVER_URL_PREFIX")
5253
if not url_prefix:
53-
print("Warning: FILESERVER_URL_PREFIX not set in environment variables")
54+
logger = logging.getLogger("uvicorn")
55+
logger.warning("Warning: FILESERVER_URL_PREFIX not set in environment variables")
5456
if file_name and url_prefix:
5557
url = f"{url_prefix}/data/{file_name}"
5658

0 commit comments

Comments
 (0)