artistypl commited on
Commit
f23ea88
1 Parent(s): 0994f8b

Update chatllm.py

Browse files

fix bug: get response

Files changed (1) hide show
  1. chatllm.py +1 -1
chatllm.py CHANGED
@@ -91,7 +91,7 @@ class ChatLLM(LLM):
91
  presence_penalty = 0,
92
  frequency_penalty = 0
93
  )
94
- result = response.choices[0].text
95
 
96
  # 将当次的ai回复内容加入history
97
  self.history.append((prompt, result))
 
91
  presence_penalty = 0,
92
  frequency_penalty = 0
93
  )
94
+ result = response['choices'][0]['message']['content']
95
 
96
  # 将当次的ai回复内容加入history
97
  self.history.append((prompt, result))