Has anyone seen a tool like this that uses Node rather than Python? I have this exact problem in a GPT-based web application I am building and have had to resort to some “creative” solutions. At the very least I am glad to see people are tackling this problem.
I've had good luck with Langchain's output parsers[0], but in addition to the format instructions I also append something like "Do not provide any explanations, just the JSON output.", which helps eliminate content being generated outside of the JSON block.
I created a toy[0] in Typescript that maps LLM responses to type-safe output.
It uses JSONSchema internally, but I’m thinking of revising it to just use Typescript directly after learning more about the ChatGPT plugin implementation (via their hackathon).
Same here. Considering switching my project (or at least part of it) to Python. For anything to do with LLMs or ML in general Python has by far the best libraries. JS is probably second, at least for LLM stuff, but it is a distant second place...