Fixed all ruff issues
This commit is contained in:
@@ -178,10 +178,10 @@ async def chat_completions(chat_request: ChatCompletionRequest):
|
||||
answer = agent.step(user_input)
|
||||
except LLMAPIError as e:
|
||||
logger.error(f"LLM API error: {e}")
|
||||
raise HTTPException(status_code=502, detail=f"LLM API error: {e}")
|
||||
raise HTTPException(status_code=502, detail=f"LLM API error: {e}") from e
|
||||
except Exception as e:
|
||||
logger.error(f"Agent error: {e}", exc_info=True)
|
||||
raise HTTPException(status_code=500, detail="Internal agent error")
|
||||
raise HTTPException(status_code=500, detail="Internal agent error") from e
|
||||
|
||||
return JSONResponse(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user