kyegomez / tree-of-thoughts

Plug in and Play Implementation of Tree of Thoughts: Deliberate Problem Solving with Large Language Models that Elevates Model Reasoning by atleast 70%
https://discord.gg/qUtxnK2NMf
Apache License 2.0
4.29k stars 361 forks source link

UnboundLocalError: local variable 'prompt' #24

Closed AshVR closed 1 year ago

AshVR commented 1 year ago

Getting this error from the example.py

\tree-of-thoughts\tree_of_thoughts\treeofthoughts.py", line 144, in evaluate_states prompt = f"Given the current state of reasoning: '{state_text}', evaluate its value as a float between 0 and 1, on the probability of this state of reasoning achieveing {prompt} and NOTHING ELSE:" UnboundLocalError: local variable 'prompt' referenced before assignment

malerius commented 1 year ago

Same for me.

Seems like this bug was introduced in the latest commit from today. Reverting lines 144 and 157 in treeofthoughts.py seems to resolve the issue, even though i am not sure if that doesn't introduce more mistakes somewhere else. script is running now, waiting for a proper fix

kyegomez commented 1 year ago

Try now with git clone 😊