From b2f8dc7c475368288bfb434f0791cab9d5911a73 Mon Sep 17 00:00:00 2001 From: Muhammad Muhajir Date: Sat, 20 Jan 2024 12:13:39 +0700 Subject: [PATCH] docs: update code example ``` LangChainDeprecationWarning: The class `langchain_community.chat_models.openai.ChatOpenAI` was deprecated in langchain-community 0.0.10 and will be removed in 0.2.0. An updated version of the class exists in the langchain-openai package and should be used instead. To use it run `pip install -U langchain-openai` and import as `from langchain_openai import ChatOpenAI`. ``` --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4ed6505d..df99e95c 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,8 @@ the Anthropic model to tell a joke about a topic. #!/usr/bin/env python from fastapi import FastAPI from langchain.prompts import ChatPromptTemplate -from langchain.chat_models import ChatAnthropic, ChatOpenAI +from langchain_community.chat_models import ChatAnthropic +from langchain_openai import ChatOpenAI from langserve import add_routes app = FastAPI(