the-compiler icon indicating copy to clipboard operation
the-compiler copied to clipboard

AuthenticationError: <empty message>

Open kyegomez opened this issue 1 year ago • 4 comments


AuthenticationError Traceback (most recent call last) in <cell line: 5>() 3 get_ipython().system('pip install tree-of-thoughts') 4 get_ipython().system('pip install openai') ----> 5 from tree_of_thoughts import OptimizedTreeofThoughts, OptimizedOpenAILanguageModel 6 import subprocess 7 import json

10 frames /usr/local/lib/python3.10/dist-packages/openai/api_requestor.py in _interpret_response_line(self, rbody, rcode, rheaders, stream) 685 stream_error = stream and "error" in resp.data 686 if stream_error or not 200 <= rcode < 300: --> 687 raise self.handle_error_response( 688 rbody, rcode, resp.data, rheaders, stream_error=stream_error 689 )

AuthenticationError:

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

kyegomez avatar May 23 '23 16:05 kyegomez

i am getting the same error when i tried to run your example. I just installed the tree-of-thoughts via pip, so I thought I'll install the latest ToT from source, but now I am getting this error from the ToT module:

Traceback (most recent call last): File "/home/bene/AI/the-compiler/test.py", line 2, in from tree_of_thoughts import OptimizedOpenAILanguageModel File "/home/bene/.local/lib/python3.10/site-packages/tree_of_thoughts-0.1.8-py3.10.egg/tree_of_thoughts/init.py", line 2, in ModuleNotFoundError: No module named 'experiements'

obviously the folder experiements is a typo, but that's not the issue here i guess.

I can look into this tomorrow (I'm in Europe). Or do you have other suggestions what to try?

benediktbwimmer avatar May 23 '23 21:05 benediktbwimmer

I was able to get around the Authentication error by generating a new API key. Not sure why I had to do that but it worked for me.

I was able to get around the the ModuleNotFound error by using the code found in the_complier.py as opposed to using the example they provided.

matsapo avatar May 25 '23 18:05 matsapo

Firstly, love the concept of the application. I believe we are heading in this direction with software development. You managed to stand this up very quickly since the TOT research was published.

After an hour of debugging I got this running in a new environment. Sharing the bugs:

  1. pip install tree_of_thought does not include the "expereiments" module. yes it is a typo but the tree of thoughts repo has the consistent module typo. I cloned the tree of thoughts repo and moved the expereiments module to my .../site-packages/ dir.
  2. documentation needs to include "pip install transformers"
  3. documentation needs to remove the create "config_json.json" step as it is in the repo
  4. in the_compiler.py you have a line that is responsible for the auth error api_key = "api key"
  5. you have hard coded your config file dir. "/Users/defalt/Desktop/Athena/research/" in the_compiler.py
  6. documentation needs to include setting env var OPENAI_API_BASE

After getting it to run the test script I got the response "Generated thoughts: ['Observation: Python is the most optimal programming language for creating a simple calculator that can perform addition, subtraction, multiplication, and division.\nThoughts: To create an architectural analysis of the calculator in Python, it is necessary to break']"

then an unhandled same origin 502 error from openai from this line the_compiler.py", line 86, in openai_api_call_handler response = openai.Completion.create(

Keep up the great work kyegomez.

screwyforcepush avatar May 26 '23 14:05 screwyforcepush

@screwyforcepush Thank you for your feedback and nice words, I'm very grateful for you.

Excuse my awaited response, I don't get notifications for issues.

I have pushed a major update and will soon cultivate this project to absurd reliability

kyegomez avatar Jul 03 '23 20:07 kyegomez