Skip to content

Commit

Permalink
Remove all other keys and add api_key, since litellm only uses api_key
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzimin committed Nov 13, 2024
1 parent 4b641f8 commit 64be7e8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libs/community/langchain_community/chat_models/litellm.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,7 @@ class ChatLiteLLM(BaseChatModel):
model: str = "gpt-3.5-turbo"
model_name: Optional[str] = None
"""Model name to use."""
openai_api_key: Optional[str] = None
azure_api_key: Optional[str] = None
anthropic_api_key: Optional[str] = None
replicate_api_key: Optional[str] = None
cohere_api_key: Optional[str] = None
openrouter_api_key: Optional[str] = None
api_key: Optional[str] = None
streaming: bool = False
api_base: Optional[str] = None
organization: Optional[str] = None
Expand Down Expand Up @@ -271,6 +266,7 @@ def _client_params(self) -> Dict[str, Any]:
if self.model_name is not None:
set_model_value = self.model_name
self.client.api_base = self.api_base
self.client.api_key = self.api_key
self.client.organization = self.organization
creds: Dict[str, Any] = {
"model": set_model_value,
Expand Down

0 comments on commit 64be7e8

Please sign in to comment.