From 89e628981d0d4991424fd80883907d9a6f252252 Mon Sep 17 00:00:00 2001 From: Alessio Vertemati Date: Tue, 4 Mar 2025 19:03:42 +0100 Subject: [PATCH] Ensure support to text chunk in reference --- tests/Documents/QuestionDocumentTest.php | 1 + tests/Fixtures/Saloon/document-question.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Documents/QuestionDocumentTest.php b/tests/Documents/QuestionDocumentTest.php index 9bcfc98..5fe18fa 100644 --- a/tests/Documents/QuestionDocumentTest.php +++ b/tests/Documents/QuestionDocumentTest.php @@ -39,6 +39,7 @@ public function test_question_asked_to_document(): void 'page_number' => 20, 'score' => 0.5881791, 'bounding_box' => null, + 'text' => 'The chunk that lead to this reference', ], ], $answer->refs); diff --git a/tests/Fixtures/Saloon/document-question.json b/tests/Fixtures/Saloon/document-question.json index 0c5428b..bfcf577 100644 --- a/tests/Fixtures/Saloon/document-question.json +++ b/tests/Fixtures/Saloon/document-question.json @@ -3,5 +3,5 @@ "headers": { "content-type": "application\/json" }, - "data": "{\"text\":\"The answer.\",\"refs\":[{\"id\":\"d1\",\"page_number\":20,\"score\":0.5881791,\"bounding_box\":null}],\"id\":\"question-id\",\"lang\":\"en\"}" + "data": "{\"text\":\"The answer.\",\"refs\":[{\"id\":\"d1\",\"page_number\":20,\"score\":0.5881791,\"bounding_box\":null, \"text\": \"The chunk that lead to this reference\"}],\"id\":\"question-id\",\"lang\":\"en\"}" } \ No newline at end of file