Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(llm): use langchain-anthropic #42

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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