Improve code style of sampler (#1168)

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

No files matched your search

+3
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)