Skip to content

armgit / strix

Public Imported from GitHub
0

Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.

fix(llm): suppress RuntimeWarnings for unawaited coroutines from asyncio

0xallamea31e0cc9d6c
diff --git a/strix/llm/__init__.py b/strix/llm/__init__.py
index 73ababd5..6f0cd76f 100644
--- a/strix/llm/__init__.py
+++ b/strix/llm/__init__.py
@@ -1,4 +1,5 @@
import logging
+import warnings
import litellm
@@ -15,3 +16,4 @@ __all__ = [
litellm._logging._disable_debugging()
logging.getLogger("asyncio").setLevel(logging.CRITICAL)
logging.getLogger("asyncio").propagate = False
+warnings.filterwarnings("ignore", category=RuntimeWarning, module="asyncio")