Skip to content

Commit

Permalink
Ignore warnings from litellm
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank committed Apr 8, 2024
1 parent 1212647 commit 41d159a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/cwhy/conversation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import json
import textwrap
import warnings

with warnings.catch_warnings():
warnings.simplefilter("ignore")
import litellm # type: ignore

import litellm # type: ignore
import llm_utils

from . import utils
Expand Down
12 changes: 5 additions & 7 deletions src/cwhy/cwhy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
import os
import subprocess
import sys
import logging
import warnings

with warnings.catch_warnings():
warnings.simplefilter("ignore")
import litellm # type: ignore

import litellm # type: ignore
import llm_utils
from openai import (
NotFoundError,
Expand All @@ -18,11 +21,6 @@
from .print_debug import dprint, enable_debug_printing


# Turn off most logging
litellm.set_verbose = False
logging.getLogger().setLevel(logging.ERROR)


def print_key_info():
dprint("You need a key (or keys) from an AI service to use CWhy.")
dprint()
Expand Down

0 comments on commit 41d159a

Please sign in to comment.