From a3a1c464b7126dfe0a53874b53eca1ceb8d16b4d Mon Sep 17 00:00:00 2001 From: I748376 Date: Wed, 10 Jul 2024 09:23:05 +0000 Subject: [PATCH] adds anthropic model to instantiation method --- prospector/llm/instantiation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prospector/llm/instantiation.py b/prospector/llm/instantiation.py index db924e722..6331e439c 100644 --- a/prospector/llm/instantiation.py +++ b/prospector/llm/instantiation.py @@ -4,11 +4,13 @@ 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 from langchain_openai import ChatOpenAI +from llm.models.anthropic import Anthropic from llm.models.gemini import Gemini from llm.models.mistral import Mistral from llm.models.openai import OpenAI @@ -26,6 +28,7 @@ # "gpt-4o": OpenAI, # currently TBD "gemini-1.0-pro": Gemini, "mistral-large": Mistral, + "claude-3-opus": Anthropic, } @@ -37,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, "ANTRHOPIC_API_KEY"), }