Skip to content

Commit

Permalink
finishes adding claude 3 opus
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraschauer committed Jul 5, 2024
1 parent 896c704 commit 744b048
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions prospector/llm/instantiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import requests
from dotenv import load_dotenv
from langchain_anthropic import ChatAnthropic
from langchain_core.language_models.llms import LLM
from langchain_google_vertexai import ChatVertexAI
from langchain_mistralai import ChatMistralAI
Expand Down Expand Up @@ -39,6 +40,7 @@
"gpt-3.5-turbo": (ChatOpenAI, "OPENAI_API_KEY"),
"gemini-pro": (ChatVertexAI, "GOOGLE_API_KEY"),
"mistral-large-latest": (ChatMistralAI, "MISTRAL_API_KEY"),
"claude-3-opus-20240229": (ChatAnthropic, "ANTHROPIC_API_KEY"),
}


Expand Down
4 changes: 2 additions & 2 deletions prospector/llm/llm_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def classify_commit(
except Exception as e:
raise RuntimeError(f"Prompt-model chain could not be invoked: {e}")

if is_relevant in ["True", "ANSWER:True"]:
if is_relevant in ["True", "ANSWER:True", "```ANSWER:True```"]:
return True
elif is_relevant in ["False", "ANSWER:False"]:
elif is_relevant in ["False", "ANSWER:False", "```ANSWER:False```"]:
return False
else:
raise RuntimeError(f"The model returned an invalid response: {is_relevant}")
1 change: 1 addition & 0 deletions prospector/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ langchain
langchain_openai
langchain_google_vertexai
langchain_mistralai
langchain_anthropic
langchain_community
omegaconf
pandas
Expand Down
4 changes: 4 additions & 0 deletions prospector/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
aiohttp==3.9.5
aiosignal==1.3.1
annotated-types==0.7.0
anthropic==0.30.1
antlr4-python3-runtime==4.9.3
anyio==4.4.0
appdirs==1.4.4
Expand All @@ -27,6 +28,7 @@ confection==0.1.5
cymem==2.0.8
dataclasses-json==0.6.6
datasketch==1.6.5
defusedxml==0.7.1
distro==1.9.0
dnspython==2.6.1
docstring-parser==0.16
Expand Down Expand Up @@ -60,9 +62,11 @@ huggingface-hub==0.23.3
idna==3.7
iniconfig==2.0.0
jinja2==3.1.4
jiter==0.5.0
jsonpatch==1.33
jsonpointer==2.4
langchain==0.2.2
langchain-anthropic==0.1.15
langchain-community==0.2.3
langchain-core==0.2.4
langchain-google-vertexai==1.0.5
Expand Down

0 comments on commit 744b048

Please sign in to comment.