From 746ea0e2e5937f50b4355abff4e86e8aa62a9c2f Mon Sep 17 00:00:00 2001 From: Ayyub Ibrahim Date: Thu, 21 Dec 2023 15:53:54 -0600 Subject: [PATCH] replaced \n with
for definitions --- packages/googlecloud/functions/getanswer/inquirer.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/googlecloud/functions/getanswer/inquirer.py b/packages/googlecloud/functions/getanswer/inquirer.py index f21ce048..75f925a7 100644 --- a/packages/googlecloud/functions/getanswer/inquirer.py +++ b/packages/googlecloud/functions/getanswer/inquirer.py @@ -180,10 +180,8 @@ def get_indepth_response_from_query(df, db, query, k): doc_list = db.similarity_search_with_score(query, k=k) docs = sort_retrived_documents(doc_list) - # print(docs) docs_page_content = append_metadata_to_content(docs) - print(docs_page_content) template = """ Question: {question} @@ -200,11 +198,15 @@ def get_indepth_response_from_query(df, db, query, k): Please provide direct and concise responses without unnecessary verbosity. - If your response includes technical or uncommon terms related to city council that may not be widely understood, kindly provide a brief definition for those terms at the end of your response. + If your response includes technical or uncommon terms related to city council that may not be widely understood, kindly provide a brief definition for those terms at the end of your response in the following format with the
brackets instead of new lines: - Definitions: [Word]: [Definition], [Word]: [Definition] + Definitions:
+ Word: Definition
+ Word: Definition
+ Word: Definition
+ + Please break the definitions onto new lines with - Please put each definition on a new line. The final output should be in paragraph form without any formatting, such as prefixing your points with "a.", "b.", or "c." The final output should not include any reference to the model's active sorting by date.