Eriberto commited on
Commit
319bb21
1 Parent(s): b6ef23b

update token count

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ bot_name = "bbDemo"
13
 
14
  def get_response_from_chatgpt(text):
15
  #try:
16
- response_api = openai.Completion.create(engine='text-davinci-003', prompt=str(text), max_tokens=1024)
17
  response_str = response_api["choices"][0]["text"].replace("\n", "")
18
  response_str = response_str.split(user_name + ": ", 1)[0].split(bot_name + ": ", 1)[0]
19
  print("RESPONSE response_api", response_api)
 
13
 
14
  def get_response_from_chatgpt(text):
15
  #try:
16
+ response_api = openai.Completion.create(engine='text-davinci-003', prompt=str(text), max_tokens=50)
17
  response_str = response_api["choices"][0]["text"].replace("\n", "")
18
  response_str = response_str.split(user_name + ": ", 1)[0].split(bot_name + ": ", 1)[0]
19
  print("RESPONSE response_api", response_api)