definitive-io / duckdb-text2sql

38 stars 40 forks source link

GROQ_BASE_URL etc. errors #10

Open Manamama opened 3 months ago

Manamama commented 3 months ago

It complained a lot about

raise FileNotFoundError(err_msg) FileNotFoundError: No secrets files found. Valid paths for a secrets.toml file are: ...

I have them there and tested these with :

import streamlit as st

if "GROQ" in st.secrets and "GROQ_API_KEY" in st.secrets["GROQ"]:
    print("GROQ_API_KEY exists in st.secrets.")
else:
    print("GROQ_API_KEY does not exist in st.secrets.")

and it is properly saved there, in the local toml.

After hard-coding the key in the app.py:

  # Get the Groq API key and create a Groq client
    #groq_api_key = st.secrets["GROQ_API_KEY"]
    groq_api_key="..."

I get now GROQ_BASE_URL

KeyError: 'st.secrets has no key "GROQ_BASE_URL". Did you forget to add it to secrets.toml or the app settings on Streamlit Cloud? More info: https://docs.streamlit.io/streamlit-cloud/get-started/deploy-an-app/connect-to-data-sources/secrets-management'

Manamama commented 3 months ago

PS. This runs fine, with environmental variables: https://github.com/definitive-io/conversational-chatbot-groq