Open FallenComet7 opened 4 months ago
I am unable to reproduce the error, if just load the tree and do not set the OpenAI key, I get the following expected error while trying to call RA.answer_question()
.
openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
The Tree structure should not store your OpenAI Key. How are you configuring the OpenAI API key in your setup? Please double-check your environment settings and ensure that the OpenAI API key is not set in unexpected places, such as hidden environment variables or within the code itself.
I saved the tree in a path and I am using it in a different instance. When I use RA.answer_question(question) it come back with answer along with this:
2024-03-07 12:04:53,593 - HTTP Request: POST https://api.openai.com/v1/embeddings "HTTP/1.1 200 OK" 2024-03-07 12:04:54,608 - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
I haven't set my Open AI key in this new instance? So I am wondering how it is working?