This is a lightweight app using the Web Research Retriever.
You only need to supply a few things.
In settings()
function, supply:
To use st.secrets
set enviorment variables in .streamlit/secrets.toml
file.
Or, simply add environemnt variables and remove st.secrets
:
import os
os.environ["GOOGLE_API_KEY"] = "YOUR_API_KEY"
os.environ["GOOGLE_CSE_ID"] = "YOUR_CSE_ID"
os.environ["OPENAI_API_BASE"] = "https://api.openai.com/v1"
os.environ["OPENAI_API_KEY"] = "YOUR_API_KEY"
For GOOGLE_API_KEY
, you could get it from this link.
For GOOGLE_CSE_ID
, you could get it from this link
streamlit run web_explorer.py
Example output: