To install and use:
1. "pip install strictjson"
2. Enter OpenAI API Key
3. "from strictjson import *"
Most output from LLM can be reliably parsed in JSON format. The problem - this JSON format may not load well into json.loads() and hence cannot be interpreted easily.
Here is where StrictJSON shines. Using a special regex, it extracts out the keys and values of the JSON reliably. Here, I am treating JSON as a Python dictionary, and it can extract out the keys and values reliably.
I have also added in a new feature, StrictJSON functions, where you can use the LLM as a function by some typing in the function description and the output format.
Moving on, I intend to develop more functionality with JSON as the root mode for data storage. Future works involve agents with tool use, and conversational agents. Stay tuned!
~~~~~~~~
0:00 StrictJSON Output Parsing
3:00 StrictJSON Functions
8:28 Type Specificity Hints
10:19 Under the hood of how StrictJSON works
~~~~~~~~
AI and ML enthusiast. Likes to think about the essences behind breakthroughs of AI and explain it in a simple and relatable way. Also, I am an avid game creator.