\[\Huge 第一期只公布代码 \]
\[\Huge Made\ In\ China \]
\[\Huge Created\ by\ daiyulong \]
import porobot,os,time,random,win32com.client
os.system('color F0')
reader=win32com.client.Dispatch("SAPI.SpVoice")
i=1
def timePrint(text):
for i in range(0,len(text)+1):
print(end='\r')
for j in range(0,i):
print(text[j],end='')
print(end=' ▋')
time.sleep(random.randint(1,250)/1000)
print('\r【ChatGPT】 ',str(n),' | ',text,sep='',end=' \n')
while True:
print(' 【我】',i,'|',end=' ')
s=input()
if s=='退出':
timePrint('那我等着你下次来!')
reader.Speak('那我等着你下次来!')
time.sleep(3)
break
answer=porobot.normal.chat(s)
timePrint(answer)
reader.Speak(answer)
i+=1
\[\Huge So\ easy \] 标签:Huge,end,text,第一期,answer,开源,reader,print,ChatGPT From: https://www.cnblogs.com/daiyulong/p/kaiyuan-ChatGPTdezhizuo-diyiqi.html