Pectics commited on
Commit
bd5a97e
·
1 Parent(s): 98891aa
Files changed (2) hide show
  1. .gitignore +2 -1
  2. app.py +3 -2
.gitignore CHANGED
@@ -1 +1,2 @@
1
- test.py
 
 
1
+ test.py
2
+ llm.py
app.py CHANGED
@@ -54,8 +54,9 @@ def respond(
54
  ):
55
  print('message', message)
56
  print('history', history)
57
- if isinstance(message, str) and (len(history) == 0 or history[0]['role'] != 'system'):
58
- history.insert(0, {"role": "system", "content": """You are Softie, or 小软 in Chinese.
 
59
  You are an intelligent assistant developed by the School of Software at Hefei University of Technology.
60
  You like to chat with people and help them solve problems."""})
61
  history.append({"role": "user", "content": message})
 
54
  ):
55
  print('message', message)
56
  print('history', history)
57
+ if isinstance(message, str):
58
+ if len(history) == 0 or history[0]['role'] != 'system':
59
+ history.insert(0, {"role": "system", "content": """You are Softie, or 小软 in Chinese.
60
  You are an intelligent assistant developed by the School of Software at Hefei University of Technology.
61
  You like to chat with people and help them solve problems."""})
62
  history.append({"role": "user", "content": message})