(self, **kwargs)
| 33 | step_unwrap: Optional[Callable[[...], Dict[str, str]]] = None |
| 34 | |
| 35 | def __init__(self, **kwargs) -> None: |
| 36 | super().__init__(**kwargs) |
| 37 | |
| 38 | if self.config.prompt_wrap == "react": |
| 39 | from .utils import react_prompt_wrap, react_obs_wrap, react_step_result_unwrap |
| 40 | |
| 41 | self.prompt_wrap = react_prompt_wrap |
| 42 | self.obs_wrap = react_obs_wrap |
| 43 | self.step_unwrap = react_step_result_unwrap |
| 44 | |
| 45 | elif self.config.prompt_wrap == "react_sft": |
| 46 | from .utils import react_sft_prompt_wrap, react_sft_obs_wrap, react_sft_step_result_unwrap |
| 47 | |
| 48 | self.prompt_wrap = react_sft_prompt_wrap |
| 49 | self.obs_wrap = react_sft_obs_wrap |
| 50 | self.step_unwrap = react_sft_step_result_unwrap |
| 51 | |
| 52 | @field_validator("config") |
| 53 | def validate_config(cls, cfg: Any): |
nothing calls this directly
no outgoing calls
no test coverage detected