From 86877003f51c403510a069b4424192984a60d28a Mon Sep 17 00:00:00 2001 From: pnadolny13 Date: Thu, 18 Jan 2024 09:53:01 -0500 Subject: [PATCH] remove hardcoded text key prop access --- map_gpt_embeddings/mappers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/map_gpt_embeddings/mappers.py b/map_gpt_embeddings/mappers.py index a2c5b51..16358fe 100644 --- a/map_gpt_embeddings/mappers.py +++ b/map_gpt_embeddings/mappers.py @@ -163,7 +163,7 @@ def map_record_message(self, message_dict: dict) -> t.Iterable[RecordMessage]: # Add to async batch file for split_record in self.split_record(message_dict["record"]): with open(self.requests_filepath.name, "a") as file: - text = message_dict["record"]["page_content"] + text = message_dict["record"][self.config["document_text_property"]] request = { "input": text.replace("\n", " "), "model":"text-embedding-ada-002",