kavansaun commited on
Commit
f46c07b
·
verified ·
1 Parent(s): 032d76d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,9 +41,9 @@ with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}
41
 
42
  time.sleep(5) # This pauses the function for the alloted amount of time (ex: time.sleep(5) -> pause for 5 seconds) *this doesnt account for the time it takes for the bot to create a response, so the bots overall response time will be noticably higher than the amount of time you put in*
43
 
44
- create_prompt = openai.ChatCompletion.create( #A sking openai for a prompt based on the current message history.
45
  model = "gpt-4o", # Change the message in the qoutes to change the model. Note: it must be a recognized model by openai's api (case sensetive).
46
- messages = user_dictionary[user_id],
47
  )
48
 
49
  reply_prompt = create_prompt.choices[0].message.content # Variable for the reply prompt.
 
41
 
42
  time.sleep(5) # This pauses the function for the alloted amount of time (ex: time.sleep(5) -> pause for 5 seconds) *this doesnt account for the time it takes for the bot to create a response, so the bots overall response time will be noticably higher than the amount of time you put in*
43
 
44
+ create_prompt = openai.ChatCompletion.create( #Asking openai for a prompt based on the current message history.
45
  model = "gpt-4o", # Change the message in the qoutes to change the model. Note: it must be a recognized model by openai's api (case sensetive).
46
+ messages = user_dictionary[user_id]
47
  )
48
 
49
  reply_prompt = create_prompt.choices[0].message.content # Variable for the reply prompt.