Skip to content

Commit

Permalink
Refactor Anthropic import to langchain_anthropic and update model to …
Browse files Browse the repository at this point in the history
…v3 (#524)

- Transition Anthropic API import to the langchain_anthropic package for
enhanced compatibility.
- Upgrade the AI model to claude-3-sonnet-20240229 for improved
performance and features.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
  • Loading branch information
donbr and eyurtsev committed Mar 15, 2024
1 parent daa7e0c commit 002902d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/chat_playground/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import List, Union

from fastapi import FastAPI
from langchain.chat_models import ChatAnthropic
from langchain_anthropic.chat_models import ChatAnthropic
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder

Expand All @@ -27,7 +27,7 @@
]
)

chain = prompt | ChatAnthropic(model="claude-2")
chain = prompt | ChatAnthropic(model_name="claude-3-sonnet-20240229")


class InputChat(BaseModel):
Expand Down

0 comments on commit 002902d

Please sign in to comment.