milwright commited on
Commit
ea8a07d
·
verified ·
1 Parent(s): 3241eed

Update app.py

Browse files

add your new secret key to "Variables and secrets" under settings with "OPENROUTER_API_KEY" as the name and the key as the value

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,10 +3,11 @@ import openai
3
  import json
4
  import random
5
  from datetime import datetime
 
6
 
7
  # Configure OpenRouter API
8
  openai.api_base = "https://openrouter.ai/api/v1"
9
- openai.api_key = "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" # Replace with your actual key
10
 
11
  class ScienceTalkGame:
12
  def __init__(self):
 
3
  import json
4
  import random
5
  from datetime import datetime
6
+ import os
7
 
8
  # Configure OpenRouter API
9
  openai.api_base = "https://openrouter.ai/api/v1"
10
+ openai.api_key = os.environ.get("OPENROUTER_API_KEY")
11
 
12
  class ScienceTalkGame:
13
  def __init__(self):