various templates improvements (#12500)

This commit is contained in:
Harrison Chase
2023-10-28 22:13:22 -07:00
committed by GitHub
parent d85d4d7822
commit 9e0ae56287
50 changed files with 462 additions and 282 deletions

View File

@@ -1,4 +1,3 @@
from langchain.chat_models import ChatOpenAI
from langchain.llms import Replicate
from langchain.prompts import ChatPromptTemplate
@@ -39,8 +38,7 @@ Respond with json that adheres to the following jsonschema:
prompt = ChatPromptTemplate.from_messages([("system", template), ("human", "{input}")])
# Chain
model = ChatOpenAI()
# Chain
chain = (
prompt
| model