From c05b94e4e90e4ece9be16b4f2f54202697448fdd Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Mon, 29 May 2023 18:57:56 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20feat(test=5Fprompts=5Ftemplate.p?= =?UTF-8?q?y):=20change=20type=20of=20"suffix"=20and=20"prefix"=20fields?= =?UTF-8?q?=20to=20"prompt"=20and=20update=20"format=5Finstructions"=20fie?= =?UTF-8?q?ld=20The=20"suffix"=20and=20"prefix"=20fields=20have=20been=20c?= =?UTF-8?q?hanged=20from=20type=20"str"=20to=20"prompt"=20to=20allow=20for?= =?UTF-8?q?=20more=20flexibility=20in=20the=20input.=20The=20"format=5Fins?= =?UTF-8?q?tructions"=20field=20has=20been=20updated=20to=20be=20required?= =?UTF-8?q?=20and=20multiline,=20and=20to=20show=20the=20instructions=20by?= =?UTF-8?q?=20default.=20This=20change=20will=20make=20it=20easier=20for?= =?UTF-8?q?=20users=20to=20understand=20the=20expected=20input=20format.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_prompts_template.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_prompts_template.py b/tests/test_prompts_template.py index 1fe6f3775..83da2f14d 100644 --- a/tests/test_prompts_template.py +++ b/tests/test_prompts_template.py @@ -182,7 +182,7 @@ def test_zero_shot_prompt(client: TestClient): "value": "Answer the following questions as best you can. You have access to the following tools:", # noqa: E501 "password": False, "name": "prefix", - "type": "str", + "type": "prompt", "list": False, "advanced": False, } @@ -194,19 +194,19 @@ def test_zero_shot_prompt(client: TestClient): "value": "Begin!\n\nQuestion: {input}\nThought:{agent_scratchpad}", "password": False, "name": "suffix", - "type": "str", + "type": "prompt", "list": False, "advanced": False, } assert template["format_instructions"] == { - "required": False, + "required": True, "placeholder": "", - "show": False, - "multiline": False, + "show": True, + "multiline": True, "value": "Use the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [{tool_names}]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question", # noqa: E501 "password": False, "name": "format_instructions", - "type": "str", + "type": "prompt", "list": False, "advanced": False, }