llama.cpp/scripts/chaton-meta-json-to-hpp.py

14 lines
219 B
Python
Executable File

#!/usr/bin/env python3
# Convert chaton meta json file to c++ hpp file
# by Humans for All
import sys
import json
fp=open(sys.argv[1])
j=json.load(fp)
print("{")
for tmpl in j:
print("\t{{ \"{}\", ".format(tmpl))