jgravelle / AutoGroq

AutoGroq is a groundbreaking tool that revolutionizes the way users interact with Autogen™ and other AI assistants. By dynamically generating tailored teams of AI agents based on your project requirements, AutoGroq eliminates the need for manual configuration and allows you to tackle any question, problem, or project with ease and efficiency.

Home Page:https://autogroq.streamlit.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The GROQ API Key must be entered every time

JaloWalt opened this issue · comments

I added to: AutoGroq/Autogroq/config.py

A new line: (as a new third line from top in the file)

GROQ_API_KEY = "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"

[yes, not my real key here in the above, only the length is same.]

But; every time when I go to: http://localhost:8501

AutoGroq still asks to input the api key as;

Enter the GROQ API Key:

After entering it the output is: API Key entered successfully.

And now as far as I understand everything works.

However the issue: "The GROQ API Key must be entered every time" when going to http://localhost:8501 still remains.

For example when going to new tab (in the same browser) the asking is:

Enter the GROQ API Key:
The actual input field here
Please enter the GROQ API Key to use the app.

I checked the situation with AutoGroq version:

"Mega-upgrades; No time for a video; tell everybody...!
1 parent e5d0f5e
commit d514614"

By doing everything again:

I cloned the AutoGroq repository with Github Desktop into my Windows 10 laptop.

After that I did the following;

Microsoft Windows [Version 10.0.19045.4412]
(c) Microsoft Corporation. All rights reserved.

C:\Users\wlab>cd C:\Users\wlab\Documents\GitHub\AutoGroq

C:\Users\wlab\Documents\GitHub\AutoGroq>python -m venv autogroq_venv

C:\Users\wlab\Documents\GitHub\AutoGroq>autogroq_venv\Scripts\activate

(autogroq_venv) C:\Users\wlab\Documents\GitHub\AutoGroq>pip install -r requirements.txt

=> No errors.

Also I added/edited my GROQ_API_KEY into C:\Users\wlab\Documents\GitHub\AutoGroq\Autogroq\config.py as I have described in this issue. And after that:

(autogroq_venv) C:\Users\wlab\Documents\GitHub\AutoGroq>streamlit run AutoGroq/main.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501
Network URL: http://yep-the-internal-ip:8501

2024-05-23 11:53:08.002 Please replace st.experimental_rerun with st.rerun.

st.experimental_rerun will be removed after 2024-04-01.
2024-05-23 11:56:09.609 Please replace st.experimental_rerun with st.rerun.

st.experimental_rerun will be removed after 2024-04-01.

RESULT: (Regarding this/my issue) exactly the same as described originally.

My python version is: 3.12.3

I found a way to "force feed" the api-key as described below:

I added to: AutoGroq/Autogroq/main.py

A new line: {as a new tenth line from top in the file [ just before def main(): ]}

os.environ['GROQ_API_KEY'] = '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'

[yes, not my real key here in the above, only the length is same.]

Yep, not final solution but will suffice for now. Case closed.