main
txt 65 lines 3.37 KB
Raw
1 # auto (final_output_only)
2 sequence
3 optional `<|open|>response<|sep|>`
4 tag `` text excluding [`<|open|>`, `<|close|>`, `<|end_of_msg|>`] `<|close|>response<|sep|>`
5 optional
6 tag `<|open|>tools<|sep|>` .. `<|close|>tools<|sep|>`
7 tags_with_separator `` at_least_one
8 tag `<|open|>call tool="get_weather" index="` .. `<|close|>call<|sep|>`
9 sequence
10 /[1-9][0-9]*/
11 `"<|sep|>`
12 or
13 tag `<|open|>argument key="location" type="string"<|sep|>` text excluding [`<|close|>argument<|sep|>`, `<|close|>call<|sep|>`] `<|close|>argument<|sep|>`
14 tag `<|open|>json type="object"<|sep|>` json({ location: string }) `<|close|>json<|sep|>`
15 tag `<|open|>call tool="add" index="` .. `<|close|>call<|sep|>`
16 sequence
17 /[1-9][0-9]*/
18 `"<|sep|>`
19 or
20 sequence
21 tag `<|open|>argument key="y" type="number"<|sep|>` json(number) `<|close|>argument<|sep|>`
22 tag `<|open|>argument key="x" type="number"<|sep|>` json(number) `<|close|>argument<|sep|>`
23 tag `<|open|>argument key="items" type="array"<|sep|>` json(string[]) `<|close|>argument<|sep|>`
24 tag `<|open|>json type="object"<|sep|>` json({ y: number, x: number, items: string[] }) `<|close|>json<|sep|>`
25 optional `<|close|>message<|sep|>`
26
27 # required (final_output_only)
28 sequence
29 optional `<|open|>response<|sep|>`
30 tag `` text excluding [`<|open|>`, `<|close|>`, `<|end_of_msg|>`] `<|close|>response<|sep|>`
31 tag `<|open|>tools<|sep|>` .. `<|close|>tools<|sep|>`
32 tags_with_separator `` at_least_one
33 tag `<|open|>call tool="get_weather" index="` .. `<|close|>call<|sep|>`
34 sequence
35 /[1-9][0-9]*/
36 `"<|sep|>`
37 or
38 tag `<|open|>argument key="location" type="string"<|sep|>` text excluding [`<|close|>argument<|sep|>`, `<|close|>call<|sep|>`] `<|close|>argument<|sep|>`
39 tag `<|open|>json type="object"<|sep|>` json({ location: string }) `<|close|>json<|sep|>`
40 tag `<|open|>call tool="add" index="` .. `<|close|>call<|sep|>`
41 sequence
42 /[1-9][0-9]*/
43 `"<|sep|>`
44 or
45 sequence
46 tag `<|open|>argument key="y" type="number"<|sep|>` json(number) `<|close|>argument<|sep|>`
47 tag `<|open|>argument key="x" type="number"<|sep|>` json(number) `<|close|>argument<|sep|>`
48 tag `<|open|>argument key="items" type="array"<|sep|>` json(string[]) `<|close|>argument<|sep|>`
49 tag `<|open|>json type="object"<|sep|>` json({ y: number, x: number, items: string[] }) `<|close|>json<|sep|>`
50 optional `<|close|>message<|sep|>`
51
52 # named (final_output_only)
53 sequence
54 optional `<|open|>response<|sep|>`
55 tag `` text excluding [`<|open|>`, `<|close|>`, `<|end_of_msg|>`] `<|close|>response<|sep|>`
56 tag `<|open|>tools<|sep|>` .. `<|close|>tools<|sep|>`
57 tags_with_separator `` at_least_one
58 tag `<|open|>call tool="get_weather" index="` .. `<|close|>call<|sep|>`
59 sequence
60 /[1-9][0-9]*/
61 `"<|sep|>`
62 or
63 tag `<|open|>argument key="location" type="string"<|sep|>` text excluding [`<|close|>argument<|sep|>`, `<|close|>call<|sep|>`] `<|close|>argument<|sep|>`
64 tag `<|open|>json type="object"<|sep|>` json({ location: string }) `<|close|>json<|sep|>`
65 optional `<|close|>message<|sep|>`