🙌 OpenHands: AI-Driven Development
Ignore any warnings LiteLLM might emit on import (#1687)
மனோஜ்குமார் பழனிச்சாமிb4cdebec0671
diff --git a/opendevin/llm/llm.py b/opendevin/llm/llm.pyindex be7560ba9d..6979f323ef 100644--- a/opendevin/llm/llm.py+++ b/opendevin/llm/llm.py@@ -1,6 +1,10 @@from functools import partial-import litellm+import warnings++with warnings.catch_warnings():+ warnings.simplefilter("ignore")+ import litellmfrom litellm import completion as litellm_completionfrom litellm import completion_cost as litellm_completion_costfrom litellm.exceptions import (diff --git a/opendevin/server/listen.py b/opendevin/server/listen.pyindex 1eb1cdde5c..a1465ad428 100644--- a/opendevin/server/listen.py+++ b/opendevin/server/listen.py@@ -3,7 +3,11 @@ import shutilimport uuidfrom pathlib import Path-import litellm+import warnings++with warnings.catch_warnings():+ warnings.simplefilter("ignore")+ import litellmfrom fastapi import Depends, FastAPI, Response, UploadFile, WebSocket, statusfrom fastapi.middleware.cors import CORSMiddlewarefrom fastapi.responses import JSONResponse, RedirectResponse