Closed mangiucugna closed 11 months ago
Thanks for the feedback !
I'll add it to the next release
... yeah, i didnt want the dependency, since its really rare these days that LLM wont produce valid JSON, (depends on the model ofc) ... but it still happens.
great to hear, if you encounter any bug or have any feature request just open an issue!
Hi, I am the maintainer of json_repair and noticed that you can refactor this code and make it faster: https://github.com/ju-bezdek/langchain-decorators/blob/539bec41bffdf3a893ba0762788326dee2d7c21f/src/langchain_decorators/output_parsers.py#L133C5-L145C5 like so:
this version makes your code dependent on json_repair so you might not want that, in that case you still use the options
return_objects=True
andskip_json_loads=True
to make your code faster since those will avoid the additional json.loads() and return an object and not a string (as you want in your code)Cheers