From aac2f5461b0d113dfdbfb6e926506c070d6afb52 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Fri, 30 Aug 2024 02:57:44 +0530 Subject: [PATCH] Option for LiteLLM to manage API keys (#604) --- pyproject.toml | 2 +- sgpt/handlers/handler.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d53a006..c4a8294 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ [project.optional-dependencies] litellm = [ - "litellm == 1.24.5" + "litellm == 1.42.5" ] test = [ "pytest >= 7.2.2, < 8.0.0", diff --git a/sgpt/handlers/handler.py b/sgpt/handlers/handler.py index c630213..a17d802 100644 --- a/sgpt/handlers/handler.py +++ b/sgpt/handlers/handler.py @@ -23,6 +23,7 @@ if use_litellm: completion = litellm.completion litellm.suppress_debug_info = True + additional_kwargs.pop("api_key") else: from openai import OpenAI