📝 docs(loading_document.mdx): update title and content to provide a clearer and more comprehensive guide on how to populate a Prompt variable with a document
✨ feat(loading_document.mdx): add step-by-step instructions on how to define a Prompt variable and connect a WebBaseLoader to it for loading a document into the variable 🔀 chore(loading_document.mdx): reorganize and rephrase the content to improve readability and clarity
This commit is contained in:
parent
924bf56ba1
commit
5d81e2f2d8
1 changed files with 9 additions and 5 deletions
|
|
@ -3,15 +3,19 @@ import useBaseUrl from "@docusaurus/useBaseUrl";
|
|||
import ZoomableImage from "/src/theme/ZoomableImage.js";
|
||||
import ReactPlayer from "react-player";
|
||||
|
||||
# Loading a document into a Prompt variable
|
||||
# Populating a Prompt Variable with a Document
|
||||
|
||||
## Overview
|
||||
|
||||
The following example shows how to load a document into a Prompt variable.
|
||||
First, we define a Prompt variable in the PromptTemplate component,
|
||||
then we connect a WebBaseLoader to that variable and build the flow.
|
||||
This walkthrough provides a step-by-step guide on how to load a document into a Prompt variable. It is a simple two-part process:
|
||||
|
||||
Once the building is complete, we can start chatting having the content of the document in the context of the conversation.
|
||||
1. **Prompt Variable Definition:** We start by defining a Prompt variable within the PromptTemplate component. This variable will serve as the placeholder for our document's content.
|
||||
|
||||
2. **WebBaseLoader Connection:** Next, we link a WebBaseLoader to the Prompt variable we've just created. This will facilitate the flow building process and ensure the content of the document is properly loaded.
|
||||
|
||||
Upon successful completion of these steps, you'll be able to start a chat with the document's content readily available within the conversational context. This provides seamless integration of the document into the chat, enhancing the user's experience by making relevant information more accessible.
|
||||
|
||||
Please follow the steps outlined in the interactive guide to understand the process in detail.
|
||||
|
||||
<iframe
|
||||
src="https://app.tango.us/app/embed/76578e84-a700-4b3b-a6ef-8a0350472781?iframe=true"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue