From 82701d7bf6571afda83cd2b20609da642274cc20 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 12 Jul 2023 22:03:29 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(loading=5Fdocument.mdx):=20?= =?UTF-8?q?add=20guide=20on=20loading=20a=20document=20into=20a=20Prompt?= =?UTF-8?q?=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds a new guide file `loading_document.mdx` that provides an overview and example on how to load a document into a Prompt variable. The guide explains the process of defining a Prompt variable in the `PromptTemplate` component, connecting a `WebBaseLoader` to the variable, and building the flow. It also demonstrates how to chat with the document content in the context of a conversation. The commit also includes an embedded iframe that showcases the functionality described in the guide. --- docs/docs/guides/loading_document.mdx | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 docs/docs/guides/loading_document.mdx diff --git a/docs/docs/guides/loading_document.mdx b/docs/docs/guides/loading_document.mdx new file mode 100644 index 000000000..fa1235e6c --- /dev/null +++ b/docs/docs/guides/loading_document.mdx @@ -0,0 +1,28 @@ +import ThemedImage from "@theme/ThemedImage"; +import useBaseUrl from "@docusaurus/useBaseUrl"; +import ZoomableImage from "/src/theme/ZoomableImage.js"; +import ReactPlayer from "react-player"; + +# Loading a document into a Prompt variable + +## 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. + +Once the building is complete, we can start chatting having the content of the document in the context of the conversation. + +