Closed webolizzer closed 1 year ago
issue is in the treeofthoughts.py file his example script is also there. Edited for clarity.
@Gumbu
Ok, it works when I run treeofthoughts.py with example in it.
Thank you very much!
Ok the problem was inside of init.py of /tree_of_thoughts directory.
This file should contain the following code:
from .treeofthoughts import TreeofThoughts, CustomLanguageModel, OptimizedOpenAILanguageModel, OptimizedTreeofThoughts
Hello,
I'm attempting to use your Tree of Thoughts (ToT) library in conjunction with OpenAI's API, but I'm encountering an issue with authentication. When I try to instantiate either the OpenAILanguageModel or OptimizedOpenAILanguageModel class with my API key, I get the following error:
openai.error.AuthenticationError: <empty message>
This is confusing because when I use the same API key in a standalone script to call OpenAI's API directly, it works perfectly fine.
Here's the relevant part of my code (with the API key redacted):
Do you have any idea why this might be happening, or suggestions for how I could troubleshoot this issue? Your guidance would be greatly appreciated.
Thank you in advance for your help.
Best Regards, Dennis