fix(gallery): render single-brace JSON in Llama 3.1 function examples

The function templates stored the few-shot JSON sample inside a Go raw
string that still had an extra pair of braces. text/template printed
that literal, so the prompt showed {{"example_name": "example_value"}}
and models copied invalid JSON.

Fixes #12890

Signed-off-by: leilei3167 <imleilei123@gmail.com>
This commit is contained in:
leilei3167 committed 2026-10-25 04:17:22 +00:00
1 parent 969ef8bda7
commit 72f1dc25fc
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ config_file: |
Think very carefully before calling functions.
If a you choose to call a function ONLY reply in the following format with no prefix or suffix:
<function=example_function_name>{{`{{"example_name": "example_value"}}`}}</function>
<function=example_function_name>{{`{"example_name": "example_value"}`}}</function>
Reminder:
- If looking for real time information use relevant functions before falling back to searching on internet
+1 -1
View File
@@ -38,7 +38,7 @@ config_file: |
Think very carefully before calling functions.
If a you choose to call a function ONLY reply in the following format with no prefix or suffix:
<function=example_function_name>{{`{{"example_name": "example_value"}}`}}</function>
<function=example_function_name>{{`{"example_name": "example_value"}`}}</function>
Reminder:
- If looking for real time information use relevant functions before falling back to searching on internet
+1 -1
View File
@@ -40,7 +40,7 @@ config_file: |
Think very carefully before calling functions.
If a you choose to call a function ONLY reply in the following format with no prefix or suffix:
<function=example_function_name>{{`{{"example_name": "example_value"}}`}}</function>
<function=example_function_name>{{`{"example_name": "example_value"}`}}</function>
Reminder:
- If looking for real time information use relevant functions before falling back to searching on internet