Spaces:
Runtime error
Runtime error
Update chatllm.py
Browse filesfix bug: openai api get result
- 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.
|
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))
|