welcome glm4 from 智谱!

This commit is contained in:
binary-husky
2024-01-16 21:51:14 +08:00
parent 96832a8228
commit 2c740fc641
2 changed files with 3 additions and 1 deletions

View File

@@ -26,6 +26,8 @@ class ZhipuRequestInstance():
)
for event in response.events():
if event.event == "add":
# if self.result_buf == "" and event.data.startswith(" "):
# event.data = event.data.lstrip(" ") # 每次智谱为啥都要带个空格开头呢?
self.result_buf += event.data
yield self.result_buf
elif event.event == "error" or event.event == "interrupted":