#openai #langchain
We can supercharge a simple Retrieval Chain by including the Conversation History in the chain and vector retrieval.
This will allow users to ask follow up questions, and the model will be able to recall information from the chat history.
☕ Buy me a coffee:
www.buymeacoffee.com/leonvanzyl
📑 Useful Links:
Langchain Python docs: python.langchain.com/docs/get...
Source Code: github.com/leonvanzyl/langcha...
Langsmith: www.langchain.com/langsmith
💬 Chat with Like-Minded Individuals on Discord:
/ discord
🧠 I can build your chatbots for you!
www.cognaitiv.ai
🕒 TIMESTAMPS:
00:00 - Intro
00:37 - Project setup
01:29 - Grab user input from terminal
03:45 - Add a Chat Loop
04:43 - Add Chat History
05:17 - HumanMessage and AIMessage Schemas
07:07 - MessagesPlaceholder
08:00 - Dynamically build chat history
08:52 - Add History to Retrieval
09:15 - Intro to Langsmith
09:35 - Intro to History Aware Retrievers
10:23 - Add History Aware Retriever
11:36 - Retriever Prompt
13:04 - Display generated query in Langsmith
14:12 - Congrats!
Негізгі бет Ғылым және технология LangChain Tutorial (Python) #5: Adding Chat History to Chatbot
Пікірлер: 45