From e18e838aaeb0a1fbdb6fbbdd523fda990414cf1c Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Wed, 5 Jul 2023 09:52:49 -0400 Subject: [PATCH] fix weird bold issues in docs (#7198) --- langchain/schema/prompt_template.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/langchain/schema/prompt_template.py b/langchain/schema/prompt_template.py index a7d17ef084b..6f11d39b86d 100644 --- a/langchain/schema/prompt_template.py +++ b/langchain/schema/prompt_template.py @@ -146,9 +146,11 @@ def format_document(doc: Document, prompt: BasePromptTemplate) -> str: First, this pulls information from the document from two sources: - 1. `page_content`: this takes the information from the `document.page_content` + 1. `page_content`: + This takes the information from the `document.page_content` and assigns it to a variable named `page_content`. - 2. metadata: this takes information from `document.metadata` and assigns + 2. metadata: + This takes information from `document.metadata` and assigns it to variables of the same name. Those variables are then passed into the `prompt` to produce a formatted string.