makhdoomnaeem commited on
Commit
c39358b
·
verified ·
1 Parent(s): 2ca9eec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -40,8 +40,10 @@ def create_vector_db(text):
40
 
41
  # Function to query Groq API
42
  def query_groq_api(query, context, model="llama-3.3-70b-versatile"):
43
- url = "https://api.groq.com/openai/v1/chat/completions"
44
  GROQ_API_KEY = "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"
 
 
45
  headers = {
46
  "Content-Type": "application/json",
47
  "Authorization": f"Bearer {os.getenv('GROQ_API_KEY')}",
 
40
 
41
  # Function to query Groq API
42
  def query_groq_api(query, context, model="llama-3.3-70b-versatile"):
43
+ #url = "https://api.groq.com/openai/v1/chat/completions"
44
  GROQ_API_KEY = "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"
45
+ os.environ["GROQ_API_KEY"] = GROQ_API_KEY
46
+ client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
47
  headers = {
48
  "Content-Type": "application/json",
49
  "Authorization": f"Bearer {os.getenv('GROQ_API_KEY')}",