mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-25 04:49:17 +00:00
notebook fmt (#12498)
This commit is contained in:
@@ -10,16 +10,18 @@ prompt = ChatPromptTemplate.from_template(answer_prompt)
|
||||
|
||||
model = ChatAnthropic(model="claude-2", temperature=0, max_tokens_to_sample=1000)
|
||||
|
||||
chain = {
|
||||
"query": lambda x: x["query"],
|
||||
"information": executor | (lambda x: x["output"])
|
||||
} | prompt | model | StrOutputParser()
|
||||
chain = (
|
||||
{"query": lambda x: x["query"], "information": executor | (lambda x: x["output"])}
|
||||
| prompt
|
||||
| model
|
||||
| StrOutputParser()
|
||||
)
|
||||
|
||||
# Add typing for the inputs to be used in the playground
|
||||
|
||||
|
||||
class Inputs(BaseModel):
|
||||
query: str
|
||||
query: str
|
||||
|
||||
|
||||
chain = chain.with_types(input_type=Inputs)
|
||||
|
Reference in New Issue
Block a user