Skip to content

GROQ_BASE_URL etc. errors #10

@Manamama

Description

@Manamama

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions