CH14 chain (Chains)
Reference
# Run Chain
# Enter a query for the document and print out the answer.
question = "The name of the AI developed by Samsung Electronics is?"
response = chain.invoke(question)# Create a Chain
chain = (
{"context": retriever, "question": RunnablePassthrough()}
| prompt
| llm
| StrOutputParser()
)Reference
Last updated