Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,8 +20,8 @@ from embedchain.config import BaseLlmConfig
|
|
| 20 |
from embedchain.helpers.callbacks import (StreamingStdOutCallbackHandlerYield,
|
| 21 |
generate)
|
| 22 |
|
| 23 |
-
client_groq = Groq(api_key=
|
| 24 |
-
client_openai = OpenAI(api_key=
|
| 25 |
|
| 26 |
link_custom_functions = [
|
| 27 |
{
|
|
@@ -77,9 +77,9 @@ def get_ec_app(api_key):
|
|
| 77 |
return app
|
| 78 |
|
| 79 |
# Initialize your clients with API keys
|
| 80 |
-
client_openai = OpenAI(api_key=
|
| 81 |
-
client_groq = Groq(api_key=
|
| 82 |
-
client_groq_one = Groq(api_key=
|
| 83 |
|
| 84 |
# Define your custom functions for OpenAI
|
| 85 |
scenario_custom_functions = [
|
|
@@ -203,7 +203,7 @@ with st.sidebar:
|
|
| 203 |
if name_reaction:
|
| 204 |
with st.sidebar:
|
| 205 |
#openai_access_token = st.text_input("OpenAI API Key", key="api_key", type="password")
|
| 206 |
-
api_key =
|
| 207 |
|
| 208 |
|
| 209 |
#if st.session_state.api_key:
|
|
|
|
| 20 |
from embedchain.helpers.callbacks import (StreamingStdOutCallbackHandlerYield,
|
| 21 |
generate)
|
| 22 |
|
| 23 |
+
client_groq = Groq(api_key=os.getenv('GROQ_API_KEY'))
|
| 24 |
+
client_openai = OpenAI(api_key=os.getenv('OPENA_AI_API_KEY'))
|
| 25 |
|
| 26 |
link_custom_functions = [
|
| 27 |
{
|
|
|
|
| 77 |
return app
|
| 78 |
|
| 79 |
# Initialize your clients with API keys
|
| 80 |
+
client_openai = OpenAI(api_key=os.getenv('OPENA_AI_API_KEY'))
|
| 81 |
+
client_groq = Groq(api_key=os.getenv('GROQ_API_KEY'))
|
| 82 |
+
client_groq_one = Groq(api_key=os.getenv('GROQ_API_KEY'))
|
| 83 |
|
| 84 |
# Define your custom functions for OpenAI
|
| 85 |
scenario_custom_functions = [
|
|
|
|
| 203 |
if name_reaction:
|
| 204 |
with st.sidebar:
|
| 205 |
#openai_access_token = st.text_input("OpenAI API Key", key="api_key", type="password")
|
| 206 |
+
api_key = os.getenv('OPENA_AI_API_KEY')
|
| 207 |
|
| 208 |
|
| 209 |
#if st.session_state.api_key:
|