Skip to content

Commit

Permalink
remove hardcoded text key prop access
Browse files Browse the repository at this point in the history
  • Loading branch information
pnadolny13 committed Jan 18, 2024
1 parent 560b75e commit 8687700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion map_gpt_embeddings/mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8687700

Please sign in to comment.