Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does .answer_question works? #5

Open
FallenComet7 opened this issue Mar 7, 2024 · 1 comment
Open

How does .answer_question works? #5

FallenComet7 opened this issue Mar 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@FallenComet7
Copy link

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?

@FallenComet7 FallenComet7 changed the title How does ,answer_question works? How does .answer_question works? Mar 7, 2024
@parthsarthi03 parthsarthi03 added the bug Something isn't working label Mar 8, 2024
@parthsarthi03
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants