From d0893d2eb79913bb10400c57be31951b83d031f2 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sat, 24 Jun 2023 16:53:13 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20chore(test=5Fprompts=5Ftemplate.?= =?UTF-8?q?py):=20remove=20unused=20test=5Ffew=5Fshot=5Fprompt=5Ftemplate?= =?UTF-8?q?=20function=20The=20test=5Ffew=5Fshot=5Fprompt=5Ftemplate=20fun?= =?UTF-8?q?ction=20is=20not=20being=20used=20and=20is=20not=20necessary=20?= =?UTF-8?q?for=20the=20tests.=20Removing=20it=20will=20make=20the=20code?= =?UTF-8?q?=20cleaner=20and=20easier=20to=20maintain.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_prompts_template.py | 79 ---------------------------------- 1 file changed, 79 deletions(-) diff --git a/tests/test_prompts_template.py b/tests/test_prompts_template.py index a8562898c..5094f50f0 100644 --- a/tests/test_prompts_template.py +++ b/tests/test_prompts_template.py @@ -88,85 +88,6 @@ def test_prompt_template(client: TestClient): } -def test_few_shot_prompt_template(client: TestClient): - response = client.get("api/v1/all") - assert response.status_code == 200 - json_response = response.json() - prompts = json_response["prompts"] - - prompt = prompts["FewShotPromptTemplate"] - template = prompt["template"] - # Test other fields in the template similar to PromptTemplate - assert template["examples"] == { - "required": False, - "placeholder": "", - "show": True, - "multiline": True, - "password": False, - "name": "examples", - "type": "prompt", - "list": True, - "advanced": False, - } - assert template["example_selector"] == { - "required": False, - "placeholder": "", - "show": False, - "multiline": False, - "password": False, - "name": "example_selector", - "type": "BaseExampleSelector", - "list": False, - "advanced": False, - } - assert template["example_prompt"] == { - "required": True, - "placeholder": "", - "show": True, - "multiline": False, - "password": False, - "name": "example_prompt", - "type": "PromptTemplate", - "list": False, - "advanced": False, - } - assert template["suffix"] == { - "required": True, - "placeholder": "", - "show": True, - "multiline": True, - "password": False, - "name": "suffix", - "type": "prompt", - "list": False, - "advanced": False, - } - assert template["example_separator"] == { - "required": False, - "placeholder": "", - "show": False, - "multiline": False, - "value": "\n\n", - "password": False, - "name": "example_separator", - "type": "str", - "list": False, - "advanced": False, - } - assert template["prefix"] == { - "required": False, - "placeholder": "", - "show": True, - "multiline": True, - "value": "", - "password": False, - "name": "prefix", - "type": "prompt", - "list": False, - "advanced": False, - } - - def test_zero_shot_prompt(client: TestClient): response = client.get("api/v1/all") assert response.status_code == 200