mgetz commited on
Commit
a0710b9
·
verified ·
1 Parent(s): e2cef0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -116,6 +116,7 @@ def respond(message, history, name, level):
116
  f"Make sure to use the user's name, {name}, in every response"
117
  f"Speak to the user as though they are a {level} and use appropriate language for them."
118
  "Keep your answers below 100 words!"
 
119
  )
120
  },
121
  {
@@ -134,7 +135,7 @@ def respond(message, history, name, level):
134
  "content": message})
135
 
136
 
137
- response = client.chat_completion(messages, max_tokens=100)
138
  print(response)
139
  #print("Chat history:" + history)
140
  return response['choices'][0]['message']['content'].strip()
 
116
  f"Make sure to use the user's name, {name}, in every response"
117
  f"Speak to the user as though they are a {level} and use appropriate language for them."
118
  "Keep your answers below 100 words!"
119
+ "Always finish your response at the end of a sentence"
120
  )
121
  },
122
  {
 
135
  "content": message})
136
 
137
 
138
+ response = client.chat_completion(messages, max_tokens=120)
139
  print(response)
140
  #print("Chat history:" + history)
141
  return response['choices'][0]['message']['content'].strip()