4 ms·
here is code (with several examples) that takes it a couple steps further by validating the output json and pydantic model and providing feedback to the llm mod
by wskish 3y ago
here is code (with several examples) that takes it a couple steps further by validating the output json and pydantic model and providing feedback to the llm model when it gets either of those wrong:
https://github.com/jiggy-ai/pydantic-chatcompletion/blob/master/pydantic_chatcompletion/__init__.py https://github.com/jiggy-ai/pydantic-chatcompletion/blob/mas...