Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create level3.py #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions llmriddles/questions/level3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from .question import register_question

CN_TEXT = """
第3题 短说长话

请输入一个字的问题,使模型的回答在100个字以上。

请在下面的输入框内填写你构造并点击按钮提交。
"""

EN_TEXT = """
Level 3. Less for more

Please enter a one-word question so that the model's answer is 100 words or more.

Please enter your query below and click the submit button
"""


def _checker(question_text: str, answer_text: str, lang: str):
_ = question_text, lang
answer_text = answer_text.strip()
if len(question_text) == 1 and len(answer_text) >= 100:
return True, None
else:
return False, None


register_question({
'cn': CN_TEXT,
'en': EN_TEXT,
}, _checker)