Improve code style of sampler (#1168)

This commit is contained in:
Liangsheng Yin
2024-08-21 16:48:24 -07:00
committed by GitHub
parent ac1b74fa85
commit 83e23c69b3
10 changed files with 268 additions and 194 deletions

View File

@@ -35,6 +35,9 @@ def character_gen(s, name):
name
+ " is a character in Harry Potter. Please fill in the following information about this character.\n"
)
s += "The constrained regex is:\n"
s += character_regex + "\n"
s += "The JSON output is:\n"
s += sgl.gen("json_output", max_tokens=256, regex=character_regex)