mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-04 22:50:18 +00:00
feat: add global exception log, add chat start params log (#14)
This commit is contained in:
commit
e917273f01
2 changed files with 19 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ from pathlib import Path
|
|||
from dotenv import load_dotenv
|
||||
from fastapi import APIRouter, Request, Response
|
||||
from fastapi.responses import StreamingResponse
|
||||
from loguru import logger
|
||||
from app.component import code
|
||||
from app.exception.exception import UserException
|
||||
from app.model.chat import Chat, HumanReply, McpServers, Status, SupplementChat
|
||||
|
|
@ -26,6 +27,8 @@ router = APIRouter(tags=["chat"])
|
|||
def post(data: Chat, request: Request):
|
||||
load_dotenv(dotenv_path=data.env_path)
|
||||
|
||||
logger.debug(f"start chat: {data.model_dump_json()}")
|
||||
|
||||
os.environ["file_save_path"] = data.file_save_path()
|
||||
os.environ["browser_port"] = str(data.browser_port)
|
||||
os.environ["OPENAI_API_KEY"] = data.api_key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue