File tree 5 files changed +9
-11
lines changed 5 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,14 @@ class AgentConfiguration(BaseConfiguration):
15
15
# models
16
16
17
17
query_model : str = field (
18
- default = "openai/gpt-4o-mini " ,
18
+ default = "anthropic/claude-3-5-haiku-20241022 " ,
19
19
metadata = {
20
20
"description" : "The language model used for processing and refining queries. Should be in the form: provider/model-name."
21
21
},
22
22
)
23
23
24
24
response_model : str = field (
25
- default = "openai/gpt-4o-mini " ,
25
+ default = "anthropic/claude-3-5-haiku-20241022 " ,
26
26
metadata = {
27
27
"description" : "The language model used for generating responses. Should be in the form: provider/model-name."
28
28
},
Original file line number Diff line number Diff line change 5
5
from langchain_core .documents import Document
6
6
from langchain_core .messages import AIMessage
7
7
from langchain_core .prompts import ChatPromptTemplate
8
- from langchain_openai import ChatOpenAI
9
8
from langsmith .evaluation import EvaluationResults , aevaluate
10
9
from langsmith .schemas import Example , Run
11
10
from pydantic import BaseModel , Field
12
11
13
12
from backend .retrieval_graph .graph import graph
14
- from backend .utils import format_docs
13
+ from backend .utils import format_docs , load_chat_model
15
14
16
15
DATASET_NAME = "chat-langchain-qa"
17
16
EXPERIMENT_PREFIX = "chat-langchain-ci"
20
19
SCORE_ANSWER_CORRECTNESS = "answer_correctness_score"
21
20
SCORE_ANSWER_VS_CONTEXT_CORRECTNESS = "answer_vs_context_correctness_score"
22
21
23
- # claude sonnet / gpt-4o are a bit too expensive
24
- JUDGE_MODEL_NAME = "gpt-4o-mini"
22
+ JUDGE_MODEL_NAME = "anthropic/claude-3-5-haiku-20241022"
25
23
26
- judge_llm = ChatOpenAI ( model_name = JUDGE_MODEL_NAME )
24
+ judge_llm = load_chat_model ( JUDGE_MODEL_NAME )
27
25
28
26
29
27
# Evaluate retrieval
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import {
10
10
} from "./ui/select" ;
11
11
12
12
const modelOptionsAndLabels : Partial < Record < ModelOptions , string > > = {
13
+ "anthropic/claude-3-5-haiku-20241022" : "Claude 3.5 Haiku" ,
13
14
"openai/gpt-4o-mini" : "GPT 4o Mini" ,
14
- "anthropic/claude-3-haiku-20240307" : "Claude 3 Haiku" ,
15
15
// "groq/llama3-70b-8192": "Llama3 70b (Groq)",
16
16
"google_genai/gemini-pro" : "Gemini Pro" ,
17
17
} ;
@@ -24,7 +24,7 @@ export function SelectModelComponent() {
24
24
< Select
25
25
onValueChange = { ( v ) => setSelectedModel ( v as ModelOptions ) }
26
26
value = { selectedModel }
27
- defaultValue = "openai/gpt-4o-mini "
27
+ defaultValue = "anthropic/claude-3-5-haiku-20241022 "
28
28
>
29
29
< SelectTrigger className = "w-[180px] border-gray-600 text-gray-200" >
30
30
< SelectValue placeholder = "Model" />
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export function GraphProvider({ children }: { children: ReactNode }) {
62
62
const { shareRun } = useRuns ( ) ;
63
63
const [ messages , setMessages ] = useState < BaseMessage [ ] > ( [ ] ) ;
64
64
const [ selectedModel , setSelectedModel ] =
65
- useState < ModelOptions > ( "openai/gpt-4o-mini " ) ;
65
+ useState < ModelOptions > ( "anthropic/claude-3-5-haiku-20241022 " ) ;
66
66
67
67
const streamMessage = async ( params : GraphInput ) : Promise < void > => {
68
68
if ( ! threadId ) {
Original file line number Diff line number Diff line change @@ -21,6 +21,6 @@ export type Feedback = {
21
21
22
22
export type ModelOptions =
23
23
| "openai/gpt-4o-mini"
24
- | "anthropic/claude-3-haiku-20240307 "
24
+ | "anthropic/claude-3-5- haiku-20241022 "
25
25
| "groq/llama3-70b-8192"
26
26
| "google_genai/gemini-pro" ;
You can’t perform that action at this time.
0 commit comments