refactored litellm to avoid duplicating workarounds

This commit is contained in:
Paul Gauthier 2024-05-08 08:05:15 -07:00
parent b249177119
commit 9ff6770a04
6 changed files with 7 additions and 20 deletions

View file

@ -4,7 +4,6 @@ import sys
from pathlib import Path
import git
import litellm
from dotenv import load_dotenv
from streamlit.web import cli
@ -13,15 +12,12 @@ from aider.args import get_parser
from aider.coders import Coder
from aider.commands import SwitchModel
from aider.io import InputOutput
from aider.litellm import litellm # noqa: F401; properly init litellm on launch
from aider.repo import GitRepo
from aider.versioncheck import check_version
from .dump import dump # noqa: F401
litellm.suppress_debug_info = True
os.environ["OR_SITE_URL"] = "http://aider.chat"
os.environ["OR_APP_NAME"] = "Aider"
def get_git_root():
"""Try and guess the git repo, since the conf.yml can be at the repo root"""