allinaigc commited on
Commit
2132d11
1 Parent(s): d9d15d6

Update app.py

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