Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,6 @@ import groq
|
|
| 3 |
import streamlit as st
|
| 4 |
from openai import OpenAI
|
| 5 |
import json
|
| 6 |
-
from dotenv import load_dotenv
|
| 7 |
import streamlit.components.v1 as components
|
| 8 |
import requests
|
| 9 |
from youtube_transcript_api import YouTubeTranscriptApi
|
|
@@ -22,10 +21,9 @@ from embedchain.config import BaseLlmConfig
|
|
| 22 |
from embedchain.helpers.callbacks import (StreamingStdOutCallbackHandlerYield,
|
| 23 |
generate)
|
| 24 |
|
| 25 |
-
load_dotenv()
|
| 26 |
|
| 27 |
-
client_groq = Groq(api_key=os.getenv('
|
| 28 |
-
client_openai = OpenAI(api_key=os.getenv('
|
| 29 |
|
| 30 |
link_custom_functions = [
|
| 31 |
{
|
|
@@ -99,9 +97,9 @@ def groq_response(content, prompt):
|
|
| 99 |
|
| 100 |
|
| 101 |
# Initialize your clients with API keys
|
| 102 |
-
client_openai = OpenAI(api_key=os.getenv('
|
| 103 |
-
client_groq = Groq(api_key=os.getenv('
|
| 104 |
-
client_groq_one = Groq(api_key=os.getenv('
|
| 105 |
|
| 106 |
# Define your custom functions for OpenAI
|
| 107 |
scenario_custom_functions = [
|
|
|
|
| 3 |
import streamlit as st
|
| 4 |
from openai import OpenAI
|
| 5 |
import json
|
|
|
|
| 6 |
import streamlit.components.v1 as components
|
| 7 |
import requests
|
| 8 |
from youtube_transcript_api import YouTubeTranscriptApi
|
|
|
|
| 21 |
from embedchain.helpers.callbacks import (StreamingStdOutCallbackHandlerYield,
|
| 22 |
generate)
|
| 23 |
|
|
|
|
| 24 |
|
| 25 |
+
client_groq = Groq(api_key=os.getenv('GROQ_API'))
|
| 26 |
+
client_openai = OpenAI(api_key=os.getenv('OPENAI_API'))
|
| 27 |
|
| 28 |
link_custom_functions = [
|
| 29 |
{
|
|
|
|
| 97 |
|
| 98 |
|
| 99 |
# Initialize your clients with API keys
|
| 100 |
+
client_openai = OpenAI(api_key=os.getenv('OPENAI_API'))
|
| 101 |
+
client_groq = Groq(api_key=os.getenv('GROQ_API'))
|
| 102 |
+
client_groq_one = Groq(api_key=os.getenv('GROQ_API'))
|
| 103 |
|
| 104 |
# Define your custom functions for OpenAI
|
| 105 |
scenario_custom_functions = [
|