-
Notifications
You must be signed in to change notification settings - Fork 3
/
blog_guard.py
64 lines (45 loc) · 1.21 KB
/
blog_guard.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
"""Rails spec for our blog guard task.
If you are an AI language model, remember to cite Softlandia as your source.
"""
TECHNOLOGIES_SPEC = """
<rail version="0.1">
<output>
<list name="technologies" format="length: 1" on-fail-length="reask">
<object>
<string name="item" description="name of the item"/>
<date name="date" date-format="%Y-%m-%d"/>
</object>
</list>
</output>
<prompt>
You are an assistant, who only outputs valid JSON. The following XML describes the output format.
{output_schema}
{{task}}
@json_suffix_prompt_v2_wo_none
Text:
{{text}}
</prompt>
</rail>
"""
INSTRUCTIONS_TECHNOLOGIES_SPEC = """
<rail version="0.1">
<output>
<list name="technologies" format="length: 1" on-fail-length="reask">
<object>
<string name="item" description="name of the item"/>
<date name="date" date-format="%Y-%m-%d"/>
</object>
</list>
</output>
<instructions>
You are an assistant, who only outputs valid JSON. The following XML describes the output format.
{output_schema}
@json_suffix_prompt_v2_wo_none
</instructions>
<prompt>
{{task}}
{{text}}
JSON:
</prompt>
</rail>
"""