Skip to content

Commit 7968c4c

Browse files
committed
Update playwright test
1 parent d0a211f commit 7968c4c

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

docs/data_ingestion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ If needed, you can modify the chunking algorithm in `scripts/prepdocslib/textspl
5757

5858
To enhance search functionality, categorize data during the ingestion process with the `--category` argument, for example `scripts/prepdocs.ps1 --category ExampleCategoryName`. This argument specifies the category to which the data belongs, enabling you to filter search results based on these categories.
5959

60-
After running the script with the desired category, ensure these categories are added to the 'Include Category' dropdown list. This can be found in the developer settings in [`Settings.tsx`](../app/frontend/src/components/settings/Settings.tsx). The default option for this dropdown is "All". By including specific categories, you can refine your search results more effectively.
60+
After running the script with the desired category, ensure these categories are added to the 'Include Category' dropdown list. This can be found in the developer settings in [`Settings.tsx`](/app/frontend/src/components/settings/Settings.tsx). The default option for this dropdown is "All". By including specific categories, you can refine your search results more effectively.
6161

6262
### Indexing additional documents
6363

tests/e2e.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,17 @@ def test_chat_customization(page: Page, live_server_url: str):
145145
# Set up a mock route to the /chat endpoint
146146
def handle(route: Route):
147147
overrides = route.request.post_data_json["context"]["overrides"]
148+
assert overrides["temperature"] == 0.5
149+
assert overrides["seed"] == 123
150+
assert overrides["minimum_search_score"] == 0.5
151+
assert overrides["minimum_reranker_score"] == 0.5
148152
assert overrides["retrieval_mode"] == "vectors"
149153
assert overrides["semantic_ranker"] is False
150154
assert overrides["semantic_captions"] is True
151155
assert overrides["top"] == 1
152156
assert overrides["prompt_template"] == "You are a cat and only talk about tuna."
153157
assert overrides["exclude_category"] == "dogs"
158+
assert overrides["suggest_followup_questions"] is True
154159
assert overrides["use_oid_security_filter"] is False
155160
assert overrides["use_groups_security_filter"] is False
156161

@@ -170,12 +175,23 @@ def handle(route: Route):
170175
page.get_by_role("button", name="Developer settings").click()
171176
page.get_by_label("Override prompt template").click()
172177
page.get_by_label("Override prompt template").fill("You are a cat and only talk about tuna.")
178+
page.get_by_label("Temperature").click()
179+
page.get_by_label("Temperature").fill("0.5")
180+
page.get_by_label("Seed").click()
181+
page.get_by_label("Seed").fill("123")
182+
page.get_by_label("Minimum search score").click()
183+
page.get_by_label("Minimum search score").fill("0.5")
184+
page.get_by_label("Minimum reranker score").click()
185+
page.get_by_label("Minimum reranker score").fill("0.5")
173186
page.get_by_label("Retrieve this many search results:").click()
174187
page.get_by_label("Retrieve this many search results:").fill("1")
188+
page.get_by_label("Include category").click()
189+
page.get_by_role("option", name="All", exact=True).click()
175190
page.get_by_label("Exclude category").click()
176191
page.get_by_label("Exclude category").fill("dogs")
177192
page.get_by_text("Use semantic captions").click()
178193
page.get_by_text("Use semantic ranker for retrieval").click()
194+
page.get_by_text("Suggest follow-up questions").click()
179195
page.get_by_text("Vectors + Text (Hybrid)").click()
180196
page.get_by_role("option", name="Vectors", exact=True).click()
181197
page.get_by_text("Stream chat completion responses").click()

0 commit comments

Comments
 (0)