| 116 | self.GENERATE_TEMPLATE = 'Background Information: "{}"\n Question: "{}"\n Please read the reference material carefully and answer the question.' # noqa E501 |
| 117 | |
| 118 | def security_content(self, tracker, response: str): |
| 119 | # 安全检查,通过为 true |
| 120 | return True |
| 121 | # if len(response) < 1: |
| 122 | # return True |
| 123 | # if self.single_judge(self.SECURITY_TEMAPLTE.format(response), |
| 124 | # tracker=tracker, |
| 125 | # throttle=3, |
| 126 | # default=0): |
| 127 | # return False |
| 128 | |
| 129 | # if openxlab_security(response): |
| 130 | # return True |
| 131 | # return False |
| 132 | |
| 133 | async def single_judge(self, prompt, tracker, throttle: int, default: int, **kwargs): |
| 134 | """Generates a score based on the prompt, and then compares it to |