noamgat / lm-format-enforcer

Enforce the output format (JSON Schema, Regex etc) of a language model
MIT License
1.51k stars 67 forks source link

[BUG ]haystackv2 integration : Importing LMFormatEnforcerLocalGenerator raise Error #135

Closed Kaelancode closed 1 month ago

Kaelancode commented 2 months ago

from lmformatenforcer.integrations.haystackv2 import LMFormatEnforcerLocalGenerator

raise error ModuleNotFoundError: No module named 'haystack.preview'

haystack-ai == 2.4 lm-format-enforcer == 0.10.6

does not work on older versions too of haystack-ai and lm-format-enforcer

noamgat commented 2 months ago

Thanks for raising this! This looks like a version compatibility issue. I hope to get to it in a few days, but if you can fix the imports to be up to date, I would be happy for a PR :)

noamgat commented 1 month ago

Fixed in version 0.10.7