artistypl commited on
Commit
3aeeedb
1 Parent(s): 8933889

Update chatllm.py

Browse files

fix bug: openai api get result

Files changed (1) hide show
  1. chatllm.py +1 -1
chatllm.py CHANGED
@@ -99,7 +99,7 @@ class ChatLLM(LLM):
99
  }
100
 
101
  response = requests.post(OPENAI_URL, headers=headers, json=payload)
102
- result = response.choice[0].text
103
 
104
  # 将当次的ai回复内容加入history
105
  self.history.append((prompt, result))
 
99
  }
100
 
101
  response = requests.post(OPENAI_URL, headers=headers, json=payload)
102
+ result = response.choices[0].text
103
 
104
  # 将当次的ai回复内容加入history
105
  self.history.append((prompt, result))