MCPcopy Create free account
hub / github.com/THUDM/AutoWebGLM / __init__

Method __init__

webarena/browser_env/html_tools/prompt.py:4–17  ·  view source on GitHub ↗
(self, prompt: str='')

Source from the content-addressed store, hash-verified

2
3class HtmlPrompt:
4 def __init__(self, prompt: str='') -> None:
5 prompt = self.extract(prompt, 'xml')
6 if prompt not in prompts:
7 raise Exception('Unknown prompt: ' + prompt)
8
9 constructors = {
10 'refine': self.normal_prompt_constructor,
11 'xml': self.normal_prompt_constructor,
12 'new_data': self.new_data_prompt_constructor,
13 }
14
15 self.name = prompt
16 self.prompt = prompts[prompt]
17 self.constructor = constructors[prompt]
18
19 @staticmethod
20 def extract(data, default=''):

Callers

nothing calls this directly

Calls 1

extractMethod · 0.95

Tested by

no test coverage detected