MCPcopy Create free account
hub / github.com/InternLM/HuixiangDou / security_content

Method security_content

web/proxy/web_worker.py:118–131  ·  view source on GitHub ↗
(self, tracker, response: str)

Source from the content-addressed store, hash-verified

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

Callers 1

generateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected