rajikudusadewale / HR-Chatbot

OpenAI LLM
MIT License
3 stars 1 forks source link

requirements.txt #1

Open scankannan opened 3 months ago

scankannan commented 3 months ago

Hi I was curious to test your bot, I notice as per your instructions for testing the chatbot you mention about installing the requirements.txt, as follows

pip install -r requirements.txt

however i do not see that file inside the repository, can you give some directions on where I could find this?

rajikudusadewale commented 3 months ago

Sorry about that, it has been added.

scankannan commented 3 months ago

thank you and should there be any specic name to the .env file? as when I used the option of "customopenai.env" containing the api key, it generated an erro that i should have the api key called via api or it should be in the .env file.

image

rajikudusadewale commented 3 months ago

env variable wont recognize this [customopenai.env]. create a [.env] file. you can create it on VS code studio if that's what you are using or create it as a normal file with the specific name.

then copy and paste this with your own api key:

OPENAI_API_KEY="your api key"

scankannan commented 3 months ago

I had created a .env file however as you can see below, it contains the key

image

I still am getting an error, not sure if you can point me to something that might be wrong here?

rajikudusadewale commented 3 months ago

edit to rename the file: remove 'hrchatbot' and leave the file name to '.env'

scankannan commented 3 months ago

did that by changing the file name to 'env' as below

image

the error is still pointing to the OpenAI key which i have already in the env file

rajikudusadewale commented 3 months ago

You omitted dot. Just copy and paste what I typed below:

.env

scankannan commented 3 months ago

ooops this was corrected , however the api key gets disabled when I update the .env file, what option should i choose, the email I receive from Open AI

Hi there,

We have determined that your OpenAI API key (sk-pro...SNP) was leaked, and have disabled it with immediate effect.

This may be because you committed your API key to an online service such as GitHub, or your key may have been compromised in another way.

rajikudusadewale commented 3 months ago

Yes, You can't commit your private key to Github. Its against their regulations.

You can save the env file on your local/cloud storage to run your chatbot

scankannan commented 3 months ago

oh ok got that letme try that

image

scankannan commented 3 months ago

however doesnt streamlit look at the github filesystem , I thought it doesnt look at the local filesystem

scankannan commented 3 months ago

Hi

I deleted the .env file from github containing the OpenAI key but have it locally that I have cloned from the Git repository, the file name on my local storage(windows) has the .env file with the Open AI key, but i am not sure if streamlit will be able to refer to the .env file stored locally? Should i have to sync the local storage to the GIT repository? as the Open AI key is not being read for some reason.

image

image

any thoughts?

scankannan commented 3 months ago

Hi raji

could you help with this?

regards