From f45e0d3486529ab33bbfbf9ed688ade5d79d498e Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 29 Mar 2023 12:27:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Unsplash=20API=E7=9A=84?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crazy_functions/高级功能函数模板.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crazy_functions/高级功能函数模板.py b/crazy_functions/高级功能函数模板.py index e9fe6bc..b74f191 100644 --- a/crazy_functions/高级功能函数模板.py +++ b/crazy_functions/高级功能函数模板.py @@ -8,12 +8,12 @@ def 高阶功能模板函数(txt, top_p, temperature, chatbot, history, systemPr for i in range(5): currentMonth = (datetime.date.today() + datetime.timedelta(days=i)).month currentDay = (datetime.date.today() + datetime.timedelta(days=i)).day - i_say = f'历史中哪些事件发生在{currentMonth}月{currentDay}日?列举两条并发送相关图片。' + i_say = f'历史中哪些事件发生在{currentMonth}月{currentDay}日?列举两条并发送相关图片。发送图片时,请使用Markdown,将Unsplash API中的PUT_YOUR_QUERY_HERE替换成描述改事件的两个最重要的单词。' chatbot.append((i_say, "[Local Message] waiting gpt response.")) yield chatbot, history, '正常' # 由于请求gpt需要一段时间,我们先及时地做一次状态显示 # history = [] 每次询问不携带之前的询问历史 - gpt_say = predict_no_ui_long_connection(inputs=i_say, top_p=top_p, temperature=temperature, history=[], sys_prompt="当你想发送一张照片时,请使用 Markdown ,并且 不要有反斜线, 不要用代码块。使用 Unsplash API (https://source.unsplash.com/1280x720/? < PUT YOUR QUERY HERE >)。") # 请求gpt,需要一段时间 + gpt_say = predict_no_ui_long_connection(inputs=i_say, top_p=top_p, temperature=temperature, history=[], sys_prompt="当你想发送一张照片时,请使用Markdown, 并且不要有反斜线, 不要用代码块。使用 Unsplash API (https://source.unsplash.com/1280x720/? < PUT_YOUR_QUERY_HERE >)。") # 请求gpt,需要一段时间 chatbot[-1] = (i_say, gpt_say) history.append(i_say);history.append(gpt_say)