POLRAMBORA commited on
Commit
36f3a91
·
verified ·
1 Parent(s): 3d98a5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -32,16 +32,15 @@ def render_avatars(userid):
32
 
33
 
34
  def authorize(user, api_key, system_message):
35
- test_data = {
36
- "user": user,
37
- "key": api_key
38
- }
39
-
40
  try:
41
  response = requests.post(
42
  "https://host.palple.polrambora.com/check_key_impv",
43
  json=test_data,
44
  )
 
 
 
45
 
46
  if response.status_code == 200:
47
  response_json = response.json()
@@ -63,8 +62,10 @@ def authorize(user, api_key, system_message):
63
  else:
64
  return False
65
  except Exception as e:
 
66
  return False
67
 
 
68
  def respond(message, api_key, max_tokens, top_p, temperature):
69
  session = sessions.get(api_key, {})
70
  headers = session.get("headers", {})
 
32
 
33
 
34
  def authorize(user, api_key, system_message):
35
+ test_data = {"user": user, "key": api_key}
 
 
 
 
36
  try:
37
  response = requests.post(
38
  "https://host.palple.polrambora.com/check_key_impv",
39
  json=test_data,
40
  )
41
+ print(f"Request Data: {test_data}")
42
+ print(f"Response Status: {response.status_code}")
43
+ print(f"Response Text: {response.text}")
44
 
45
  if response.status_code == 200:
46
  response_json = response.json()
 
62
  else:
63
  return False
64
  except Exception as e:
65
+ print(f"Exception occurred: {str(e)}")
66
  return False
67
 
68
+
69
  def respond(message, api_key, max_tokens, top_p, temperature):
70
  session = sessions.get(api_key, {})
71
  headers = session.get("headers", {})