Skip to content

Commit 7f32ac5

Browse files
author
Erick Friis
authored
sonnet to haiku (#305)
1 parent a854693 commit 7f32ac5

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

MODIFY.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The LLM is used inside the `/chat` endpoint for generating the final answer, and
7373
Without any modification, we offer a few LLM providers out of the box:
7474

7575
- `gpt-3.5-turbo-0125` by OpenAI
76-
- `claude-3-sonnet-20240229` by Anthropic
76+
- `claude-3-haiku-20240307` by Anthropic
7777
- `mixtral-8x7b` by Fireworks
7878
- `gemini-pro` by Google
7979
- `command` by Cohere
@@ -97,8 +97,8 @@ llm = ChatOpenAI(
9797
# When configuring the end runnable, we can then use this id to configure this field
9898
ConfigurableField(id="llm"),
9999
default_key="openai_gpt_3_5_turbo",
100-
anthropic_claude_3_sonnet=ChatAnthropic(
101-
model="claude-3-sonnet-20240229",
100+
anthropic_claude_3_haiku=ChatAnthropic(
101+
model="claude-3-haiku-20240307",
102102
max_tokens=16384,
103103
temperature=0,
104104
anthropic_api_key=os.environ.get("ANTHROPIC_API_KEY", "not_provided"),
@@ -138,7 +138,7 @@ response_synthesizer = (
138138
default_response_synthesizer.configurable_alternatives(
139139
ConfigurableField("llm"),
140140
default_key="openai_gpt_3_5_turbo",
141-
anthropic_claude_3_sonnet=default_response_synthesizer,
141+
anthropic_claude_3_haiku=default_response_synthesizer,
142142
...
143143
local_ollama=default_response_synthesizer,
144144
)

backend/chain.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def cohere_response_synthesizer(input: dict) -> RunnableSequence:
222222
default_response_synthesizer.configurable_alternatives(
223223
ConfigurableField("llm"),
224224
default_key="openai_gpt_3_5_turbo",
225-
anthropic_claude_3_sonnet=default_response_synthesizer,
225+
anthropic_claude_3_haiku=default_response_synthesizer,
226226
fireworks_mixtral=default_response_synthesizer,
227227
google_gemini_pro=default_response_synthesizer,
228228
cohere_command=cohere_response_synthesizer,
@@ -237,8 +237,8 @@ def cohere_response_synthesizer(input: dict) -> RunnableSequence:
237237

238238

239239
gpt_3_5 = ChatOpenAI(model="gpt-3.5-turbo-0125", temperature=0, streaming=True)
240-
claude_3_sonnet = ChatAnthropic(
241-
model="claude-3-sonnet-20240229",
240+
claude_3_haiku = ChatAnthropic(
241+
model="claude-3-haiku-20240307",
242242
temperature=0,
243243
max_tokens=4096,
244244
anthropic_api_key=os.environ.get("ANTHROPIC_API_KEY", "not_provided"),
@@ -266,12 +266,12 @@ def cohere_response_synthesizer(input: dict) -> RunnableSequence:
266266
# When configuring the end runnable, we can then use this id to configure this field
267267
ConfigurableField(id="llm"),
268268
default_key="openai_gpt_3_5_turbo",
269-
anthropic_claude_3_sonnet=claude_3_sonnet,
269+
anthropic_claude_3_haiku=claude_3_haiku,
270270
fireworks_mixtral=fireworks_mixtral,
271271
google_gemini_pro=gemini_pro,
272272
cohere_command=cohere_command,
273273
).with_fallbacks(
274-
[gpt_3_5, claude_3_sonnet, fireworks_mixtral, gemini_pro, cohere_command]
274+
[gpt_3_5, claude_3_haiku, fireworks_mixtral, gemini_pro, cohere_command]
275275
)
276276

277277
retriever = get_retriever()

frontend/app/components/ChatWindow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { apiBaseUrl } from "../utils/constants";
2929

3030
const MODEL_TYPES = [
3131
"openai_gpt_3_5_turbo",
32-
"anthropic_claude_3_sonnet",
32+
"anthropic_claude_3_haiku",
3333
"google_gemini_pro",
3434
"fireworks_mixtral",
3535
"cohere_command",
@@ -255,7 +255,7 @@ export function ChatWindow(props: { conversationId: string }) {
255255
width={"240px"}
256256
>
257257
<option value="openai_gpt_3_5_turbo">GPT-3.5-Turbo</option>
258-
<option value="anthropic_claude_3_sonnet">Claude 3 Sonnet</option>
258+
<option value="anthropic_claude_3_haiku">Claude 3 Haiku</option>
259259
<option value="google_gemini_pro">Google Gemini Pro</option>
260260
<option value="fireworks_mixtral">
261261
Mixtral (via Fireworks.ai)

0 commit comments

Comments
 (0)