Not able to find secrets.toml file

Hii all. This is my code

import openai
import streamlit as st
from streamlit_chat import message
openai.api_key = st.secrets['pass']
def generate_response(prompt):
    completions = openai.Completion.create(
        engine = "text-davinci-003",
        prompt = prompt,
        max_tokens = 1024,
        n = 1,
        stop = None,
    message = completions.choices[0].text
    return message 
#Creating the chatbot interface
st.title("chatBot : Streamlit + openAI")

but its giving the error…

I see that .streamlit folder in there is my home diectory /user/shiva but secrets.toml is not found. how to create that file.

Open the folder in the File Explorer, right click, New, Text file, change the name to secrets.toml.

Hii. Thankyou for helping. Yes I created a text file and named as secret.toml. it is taken as text file and not toml file.

Indeed it is supposed to contain text, so that is fine.

then still im getting the same error… pls help …

Sorry, I always forget that Windows by default doesn’t show you the complete file names.

If you select View->File name extensions, you will see that secrets.toml is actually secrets.toml.txt. Remove the .txt part.