Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Sep 1, 2023
1 parent 5cf3a1f commit 2cdb5e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
5 changes: 1 addition & 4 deletions codeinterpreterapi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class CodeInterpreterAPISettings(BaseSettings):
AZURE_API_VERSION: Optional[str] = None
AZURE_DEPLOYMENT_NAME: Optional[str] = None
ANTHROPIC_API_KEY: Optional[str] = None
OPENROUTER_API_KEY: Optional[str] = None
OPENROUTER_API_BASE: Optional[str] = "https://openrouter.ai/api/v1"
OPENROUTER_DEFAULT_CHAT_MODEL = "openai/gpt-4"

# LLM Settings
MODEL: str = "gpt-3.5-turbo"
Expand All @@ -44,7 +41,7 @@ class CodeInterpreterAPISettings(BaseSettings):

# CodeBox
CODEBOX_API_KEY: Optional[str] = None
CUSTOM_PACKAGES: list[str] = [] # implement custom logic for codebox
CUSTOM_PACKAGES: list[str] = []

# deprecated
VERBOSE: bool = DEBUG
Expand Down
7 changes: 0 additions & 7 deletions codeinterpreterapi/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@ def _choose_llm(self) -> BaseChatModel:
temperature=settings.TEMPERATURE,
anthropic_api_key=settings.ANTHROPIC_API_KEY,
)
elif settings.OPENROUTER_API_KEY:
return ChatOpenAI(
model=settings.OPENROUTER_DEFAULT_CHAT_MODEL,
temperature=settings.TEMPERATURE,
openai_api_key=settings.OPENROUTER_API_KEY,
openai_api_base=settings.OPENROUTER_API_BASE,
)
else:
raise ValueError("Please set the API key for the LLM you want to use.")

Expand Down

0 comments on commit 2cdb5e2

Please sign in to comment.