guidance-ai / guidance

A guidance language for controlling large language models.
MIT License
18.14k stars 1.01k forks source link

import failed #855

Closed eyalk11 closed 1 month ago

eyalk11 commented 1 month ago

The bug A clear and concise description of what the bug is.

I tried to install multiple ersions 0.1.14 and 0.1.15 and from git. import guidance didn't work in all casess!

image

To Reproduce Give a full working code snippet that can be pasted into a notebook cell or python file. Make sure to include the LLM load step so we know which model you are using.

# put your code snippet here
import guidance

System info (please complete the following information):

eyalk11 commented 1 month ago

Apperently it does work in python 3.11 . Please set limit in pyproject.toml if there is one

Harsha-Nori commented 1 month ago

Weird -- we run tests regularly on python 3.10 and it should run fine. It seems like from the stack trace here that you had a potentially old version of the openai library that maybe got updated on a reinstall?

We don't force hard dependencies on any of the platforms we support -- otherwise we'd have to force an install of openai, anthropic, transformers, llama-cpp-python, pytorch, etc. etc. even if a user only wants to use one of those models. But without having a hard dependency, it's also quite tricky to enforce minimum version numbers.

Closing this for now as I believe it's just a openAI python library version issue (they recently made a breaking change to their API), but feel free to re-open if this continues to act up! And we'll keep brainstorming better ways of checking for/enforcing dependency versions on our end.