Liusuthu commited on
Commit
bba347a
·
verified ·
1 Parent(s): 1912c8f

Update chat.py

Browse files
Files changed (1) hide show
  1. chat.py +12 -12
chat.py CHANGED
@@ -15,18 +15,18 @@ def predict(message, history):
15
  history_openai_format.append({"role": "assistant", "content":assistant})
16
  history_openai_format.append({"role": "user", "content": message})
17
 
18
- response = client.chat.completions.create(model='gpt-3.5-turbo',
19
- # messages= history_openai_format,
20
- messages=[
21
- {
22
- "role": "system",
23
- "content": "你是一个专业的中国心理医生,你的所有内容都需要用【中文】回答,你必须对你的患者耐心,你需要以【朋友】的身份和患者交流,这意味着你需要用更加【口语化】的文字回答,并且【不要长篇大论】,更【不要分点作答】。",
24
- },
25
- {
26
- "role": "user",
27
- "content": message,
28
- },
29
- ],
30
  temperature=1.0,
31
  stream=True)
32
 
 
15
  history_openai_format.append({"role": "assistant", "content":assistant})
16
  history_openai_format.append({"role": "user", "content": message})
17
 
18
+ response = client.chat.completions.create(model='gpt-4.0-turbo',
19
+ messages= history_openai_format,
20
+ # messages=[
21
+ # {
22
+ # "role": "system",
23
+ # "content": "你是一个专业的中国心理医生,你的所有内容都需要用【中文】回答,你必须对你的患者耐心,你需要以【朋友】的身份和患者交流,这意味着你需要用更加【口语化】的文字回答,并且【不要长篇大论】,更【不要分点作答】。",
24
+ # },
25
+ # {
26
+ # "role": "user",
27
+ # "content": message,
28
+ # },
29
+ # ],
30
  temperature=1.0,
31
  stream=True)
32