Skip to content

Commit

Permalink
fix(llm): use langchain-anthropic (#42)
Browse files Browse the repository at this point in the history
- add langchain-anthropic
- add langchain-core
- bump langchain-community
  • Loading branch information
fynnfluegge authored Apr 15, 2024
1 parent f3ceae8 commit 57194eb
Show file tree
Hide file tree
Showing 5 changed files with 926 additions and 657 deletions.
4 changes: 2 additions & 2 deletions codeqai/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def create_config():
),
]

elif config["llm-host"] == "OpenAI":
elif config["llm-host"] == LlmHost.OPENAI.value:
questions = [
inquirer.List(
"chat-model",
Expand All @@ -181,7 +181,7 @@ def create_config():
),
]

elif config["llm-host"] == "Anthropic":
elif config["llm-host"] == LlmHost.ANTHROPIC.value:
questions = [
inquirer.List(
"chat-model",
Expand Down
2 changes: 1 addition & 1 deletion codeqai/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ class LlmHost(Enum):
OLLAMA = "Ollama"
OPENAI = "OpenAI"
AZURE_OPENAI = "Azure-OpenAI"
ANTHROPIC = "Anhtropic"
ANTHROPIC = "Anthropic"
3 changes: 2 additions & 1 deletion codeqai/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import inquirer
from langchain.callbacks.manager import CallbackManager
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from langchain_community.chat_models import AzureChatOpenAI, ChatAnthropic
from langchain_anthropic import ChatAnthropic
from langchain_community.chat_models import AzureChatOpenAI
from langchain_community.llms import LlamaCpp, Ollama
from langchain_openai import ChatOpenAI

Expand Down
Loading

0 comments on commit 57194eb

Please sign in to comment.