allinaigc commited on
Commit
6a85148
·
1 Parent(s): d671d3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -54,6 +54,9 @@ def chatbot(input, choice):
54
  try:
55
  if input and choice!='联网增强模式':
56
  print('start the NO internet version of ChatGPT')
 
 
 
57
  messages.append({"role": "user", "content": input})
58
  for resp in openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=messages, stream=True, max_tokens=2048,temperature=0.9):
59
  answer = str(resp['choices'][0]['delta'].get('content'))
 
54
  try:
55
  if input and choice!='联网增强模式':
56
  print('start the NO internet version of ChatGPT')
57
+ messages = [
58
+ # {"role": "system", "content": "You are a helpful and kind AI Assistant."},
59
+ {"role": "system", "content": "你是一个专业和友好的AI助手。"},]
60
  messages.append({"role": "user", "content": input})
61
  for resp in openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=messages, stream=True, max_tokens=2048,temperature=0.9):
62
  answer = str(resp['choices'][0]['delta'].get('content'))