diff --git a/models/search_model.py b/models/search_model.py index 8607650..c985e07 100644 --- a/models/search_model.py +++ b/models/search_model.py @@ -120,6 +120,8 @@ class Search: # Get the file path of this tempfile.NamedTemporaryFile # Save this temp file to an actual file that we can put into something else to read it documents = SimpleDirectoryReader(input_files=[f.name]).load_data() + for document in documents: + document.extra_info = {"URL": url} print("Loaded the PDF document data") # Delete the temporary file