Download src/infiagent/prompt/simple_react_prompt.py from g3eIL/InfiAgent: direct link, hf CLI and curl.
- Browser
- Download file 529 Bytes
-
https://huggingface.co/spaces/g3eIL/InfiAgent/resolve/main/src/infiagent/prompt/simple_react_prompt.py
- Command line
-
hf download hf://spaces/g3eIL/InfiAgent/src/infiagent/prompt/simple_react_prompt.py
-
curl -L -o simple_react_prompt.py https://huggingface.co/spaces/g3eIL/InfiAgent/resolve/main/src/infiagent/prompt/simple_react_prompt.py
529 Bytes
| from ..prompt import FINAL_ANSWER_KEY, OBSERVATION_KEY, THOUGHT_KEY, PromptTemplate | |
| class SimpleReactPrompt(PromptTemplate): | |
| _input_variables = ["instruction", "agent_scratchpad"] | |
| _template = "{instruction} \n{agent_scratchpad}" | |
| _keywords = { | |
| OBSERVATION_KEY: "[EOS]Observation:", | |
| THOUGHT_KEY: "[SEP]", | |
| FINAL_ANSWER_KEY: "[END]" | |
| } | |
| _name = 'SimpleReactPrompt' | |
| _validate_template = True | |
| _skip_on_failure = True | |
| def __init__(self, **data): | |
| super().__init__(**data) | |