大模型多轮对话调用
This commit is contained in:
parent
600b98bdec
commit
cef21524d5
|
@ -2,7 +2,7 @@ import requests
|
||||||
import urllib3
|
import urllib3
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
# 该文件实现了与大模型的简单通信
|
# 该文件实现了与大模型的简单通信、多轮对话,输入end表示对话结束
|
||||||
########################################
|
########################################
|
||||||
|
|
||||||
# 忽略https的安全性警告
|
# 忽略https的安全性警告
|
||||||
|
@ -26,4 +26,4 @@ while k!='end':
|
||||||
assistant_dict={"role": "assistant","content":answer}
|
assistant_dict={"role": "assistant","content":answer}
|
||||||
data_memory.append(assistant_dict)
|
data_memory.append(assistant_dict)
|
||||||
n=n+2
|
n=n+2
|
||||||
k=input()
|
k=input()
|
||||||
|
|
Loading…
Reference in New Issue