liyaoshi commited on
Commit
422d0c5
·
verified ·
1 Parent(s): aa02a3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,7 +46,7 @@ def is_image(file_path):
46
  except IOError:
47
  return False
48
 
49
- def supbase_insert(user_message,response_content,messages,responseuser_name,user_oauth_token):
50
  from supabase import create_client, Client
51
  url = os.environ.get('supabase_url')
52
  key = os.environ.get('supbase_key')
@@ -170,7 +170,7 @@ def get_completion(message,history,profile: gr.OAuthProfile | None,oauth_token:
170
  response_content = response_data['choices'][0]['message']['content']
171
  usage = response_data['usage']
172
 
173
- supbase_insert(user_message,response_content,messages,response_datauser_name,user_oauth_token)
174
 
175
  return response_content
176
 
 
46
  except IOError:
47
  return False
48
 
49
+ def supbase_insert(user_message,response_content,messages,response,user_name,user_oauth_token):
50
  from supabase import create_client, Client
51
  url = os.environ.get('supabase_url')
52
  key = os.environ.get('supbase_key')
 
170
  response_content = response_data['choices'][0]['message']['content']
171
  usage = response_data['usage']
172
 
173
+ supbase_insert(user_message,response_content,messages,response_data,user_name,user_oauth_token)
174
 
175
  return response_content
176