llama.cpp
77390baa - jinja : write floats in tojson as Python does (#30362)

Commit
1 day ago
jinja : write floats in tojson as Python does (#30362) tojson printed floats through a C++ stream (6 significant digits, no ".0"), so 48.858844 became 48.8588 and 1.0 became 1 in tool definitions, tool-call arguments and other template output. Write the shortest digits that read back as the same value, as json.dumps does. The string and safe filters of a float use the same code.
Author
Parents
Loading