diff --git a/litellm/__pycache__/__init__.cpython-311.pyc b/litellm/__pycache__/__init__.cpython-311.pyc index e17bca81af..31a82ea237 100644 Binary files a/litellm/__pycache__/__init__.cpython-311.pyc and b/litellm/__pycache__/__init__.cpython-311.pyc differ diff --git a/litellm/__pycache__/main.cpython-311.pyc b/litellm/__pycache__/main.cpython-311.pyc index 8c0ea5248a..7b2cfb62c4 100644 Binary files a/litellm/__pycache__/main.cpython-311.pyc and b/litellm/__pycache__/main.cpython-311.pyc differ diff --git a/litellm/__pycache__/utils.cpython-311.pyc b/litellm/__pycache__/utils.cpython-311.pyc index 7cc40ee873..3f86acb098 100644 Binary files a/litellm/__pycache__/utils.cpython-311.pyc and b/litellm/__pycache__/utils.cpython-311.pyc differ diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index 9867811bb3..d40ccf7db4 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -13,6 +13,12 @@ config_filename = ".env.litellm" config_dir = appdirs.user_config_dir("litellm") user_config_path = os.path.join(config_dir, config_filename) +def run_ollama_serve(): + command = ['ollama', 'serve'] + + with open(os.devnull, 'w') as devnull: + process = subprocess.Popen(command, stdout=devnull, stderr=devnull) + def load_config(): try: if not os.path.exists(user_config_path): @@ -82,6 +88,8 @@ def run_server(port, api_base, model, deploy, debug, temperature, max_tokens, te print(f"\033[32mLiteLLM: Test your URL using the following: \"litellm --test {url}\"\033[0m") return + if "ollama" in model: + run_ollama_serve() if test != False: click.echo('LiteLLM: Making a test ChatCompletions request to your proxy') import openai