krishnasimha commited on
Commit
5417d7d
·
verified ·
1 Parent(s): 03f6d77

Update app4.py

Browse files
Files changed (1) hide show
  1. app4.py +1 -2
app4.py CHANGED
@@ -194,10 +194,9 @@ def update_news_hourly():
194
  # Async Together API
195
  # -------------------
196
  async def async_together_chat(messages):
197
- api_key = st.secrets["TOGETHER_API_KEY"] # Access here, not globally
198
  url = "https://api.together.xyz/v1/chat/completions"
199
  headers = {
200
- "Authorization": f"Bearer {api_key}",
201
  "Content-Type": "application/json",
202
  }
203
  payload = {
 
194
  # Async Together API
195
  # -------------------
196
  async def async_together_chat(messages):
 
197
  url = "https://api.together.xyz/v1/chat/completions"
198
  headers = {
199
+ "Authorization": f"Bearer {os.environ['TOGETHER_API_KEY']}",
200
  "Content-Type": "application/json",
201
  }
202
  payload = {