From 03d6851e8ab4ad923bf7aacbcbf0e23688947a3a Mon Sep 17 00:00:00 2001 From: Pisanu Federico Date: Fri, 9 Aug 2024 09:38:04 +0200 Subject: [PATCH 1/2] updated docs --- api-reference/elements/pdf.mdx | 9 +++++++-- data-persistence/custom.mdx | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/api-reference/elements/pdf.mdx b/api-reference/elements/pdf.mdx index e0be4ea..c0cf95f 100644 --- a/api-reference/elements/pdf.mdx +++ b/api-reference/elements/pdf.mdx @@ -30,6 +30,11 @@ The `Pdf` class allows you to display a PDF hosted remotely or locally in the ch content for a local PDF (or url for a remote PDF). + + The default rendered page. Must be an integer greater than 0 and less than or + equal to the total number of pages in the PDF. + + ## Example ### Inline @@ -41,7 +46,7 @@ import chainlit as cl async def main(): # Sending a pdf with the local file path elements = [ - cl.Pdf(name="pdf1", display="inline", path="./pdf1.pdf") + cl.Pdf(name="pdf1", display="inline", path="./pdf1.pdf", page=1) ] cl.Message(content="Look at this local pdf!", elements=elements).send() @@ -58,7 +63,7 @@ import chainlit as cl async def main(): # Sending a pdf with the local file path elements = [ - cl.Pdf(name="pdf1", display="side", path="./pdf1.pdf") + cl.Pdf(name="pdf1", display="side", path="./pdf1.pdf", page=1) ] # Reminder: The name of the pdf must be in the content of the message await cl.Message(content="Look at this local pdf1!", elements=elements).send() diff --git a/data-persistence/custom.mdx b/data-persistence/custom.mdx index 8a79dbf..6a2796d 100644 --- a/data-persistence/custom.mdx +++ b/data-persistence/custom.mdx @@ -52,7 +52,6 @@ CREATE TABLE IF NOT EXISTS steps ( "type" TEXT NOT NULL, "threadId" UUID NOT NULL, "parentId" UUID, - "disableFeedback" BOOLEAN NOT NULL, "streaming" BOOLEAN NOT NULL, "waitForAnswer" BOOLEAN, "isError" BOOLEAN, From ee86a09b1f61de1084094424269e316cad01f215 Mon Sep 17 00:00:00 2001 From: Pisanu Federico Date: Fri, 9 Aug 2024 09:45:42 +0200 Subject: [PATCH 2/2] added default value for page argument --- api-reference/elements/pdf.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-reference/elements/pdf.mdx b/api-reference/elements/pdf.mdx index c0cf95f..2fd66c6 100644 --- a/api-reference/elements/pdf.mdx +++ b/api-reference/elements/pdf.mdx @@ -32,7 +32,7 @@ The `Pdf` class allows you to display a PDF hosted remotely or locally in the ch The default rendered page. Must be an integer greater than 0 and less than or - equal to the total number of pages in the PDF. + equal to the total number of pages in the PDF. The default value is 1. ## Example