mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-11-15 07:19:53 +00:00
a71d81cf8c
* server : simple chat UI with vuejs and daisyui * move old files to legacy folder * embed deps into binary * basic markdown support * add conversation history, save to localStorage * fix bg-base classes * save theme preferences * fix tests * regenerate, edit, copy buttons * small fixes * docs: how to use legacy ui * better error handling * make CORS preflight more explicit * add GET method for CORS * fix tests * clean up a bit * better auto scroll * small fixes * use collapse-arrow * fix closeAndSaveConfigDialog * small fix * remove console.log * fix style for <pre> element * lighter bubble color (less distract when reading)
11 lines
402 B
JavaScript
11 lines
402 B
JavaScript
import { readFileSync } from "fs"
|
|
import { SchemaConverter } from "../examples/server/public_legacy/json-schema-to-grammar.mjs"
|
|
|
|
const [, , file] = process.argv
|
|
const url = `file://${file}`
|
|
let schema = JSON.parse(readFileSync(file, "utf8"));
|
|
const converter = new SchemaConverter({})
|
|
schema = await converter.resolveRefs(schema, url)
|
|
converter.visit(schema, '')
|
|
console.log(converter.formatGrammar())
|