Joseph Weitzel commited on
Commit
aefaf83
1 Parent(s): ab1ba2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -24,7 +24,9 @@ def construct_index(directory_path):
24
 
25
  return index
26
 
27
- def chatbot(input_text, token):
 
 
28
  index = GPTSimpleVectorIndex.load_from_disk('index.json')
29
  response = index.query(input_text, response_mode="compact")
30
  return response.response
 
24
 
25
  return index
26
 
27
+ def chatbot(input_text, api_token):
28
+ if api_token != os.environ["API_TOKEN"]:
29
+ return 'API_TOKEN does not match'
30
  index = GPTSimpleVectorIndex.load_from_disk('index.json')
31
  response = index.query(input_text, response_mode="compact")
32
  return response.response