From bf37b414271041aeb09ed28863cb05d25c763c87 Mon Sep 17 00:00:00 2001 From: lyie28 Date: Mon, 26 Aug 2024 10:53:13 +0200 Subject: [PATCH] add authorized paths to gradio --- lavague-core/lavague/core/navigation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lavague-core/lavague/core/navigation.py b/lavague-core/lavague/core/navigation.py index 020f2232..c8b52f79 100644 --- a/lavague-core/lavague/core/navigation.py +++ b/lavague-core/lavague/core/navigation.py @@ -248,8 +248,11 @@ def execute_instruction_gradio(self, instruction: str, action_engine: Any): except: pass start = time.time() + authorized_xpaths = extract_xpaths_from_html(llm_context) prompt = self.prompt_template.format( - context_str=llm_context, query_str=instruction + context_str=llm_context, + query_str=instruction, + authorized_xpaths=authorized_xpaths, ) response = self.llm.complete(prompt).text end = time.time()