Improve docs & Add JSON decode example (#121)

This commit is contained in:
Lianmin Zheng
2024-01-30 05:45:27 -08:00
committed by GitHub
parent 0617528632
commit 97aa9b3284
19 changed files with 212 additions and 61 deletions

View File

@@ -34,7 +34,7 @@ character_regex = (
# fmt: off
def character_gen(name, generate):
s = name+ " is a character in Harry Potter. Please fill in the following information about him/her.\n"
s = name + " is a character in Harry Potter. Please fill in the following information about this character.\n"
s += generate(s, max_tokens=256, regex=character_regex)
return s
# fmt: on

View File

@@ -32,7 +32,7 @@ character_regex = (
# fmt: off
@sgl.function
def character_gen(s, name):
s += name+ " is a character in Harry Potter. Please fill in the following information about him/her.\n"
s += name + " is a character in Harry Potter. Please fill in the following information about this character.\n"
s += sgl.gen("json_output", max_tokens=256, regex=character_regex)
# fmt: on