Pass file path of each doc reference in references returned by API

- Pass file path of reference along with the compiled reference in
  list of references returned by chat API converts
- Update the structure of references from list of strings to list of
  dictionary (containing 'compiled' and 'file' keys)
- Pull out the compiled reference from the new references data struct
  wherever it was is being used
This commit is contained in:
Debanjum Singh Solanky
2024-05-26 17:18:38 +05:30
parent ba330712f8
commit e24ca9ec28
9 changed files with 24 additions and 15 deletions

View File

@@ -127,7 +127,7 @@ def converse(
"""
# Initialize Variables
current_date = datetime.now().strftime("%Y-%m-%d")
compiled_references = "\n\n".join({f"# {item}" for item in references})
compiled_references = "\n\n".join({f"# {item['compiled']}" for item in references})
conversation_primer = prompts.query_prompt.format(query=user_query)