只需一个提示词解除GPT-4的字符限制!

ChatGPT的内存有限,GPT-3.5-turbo的限制为4897个令牌,而GPT-4的最大限制为8192。如果您在使用GPT-4进行聊天时超过8192个令牌(约6827个单词),它就会开始遗忘。我想出了一种新的技巧,可以轻松将对话扩展10倍。

这种技巧不会将对话中的每个字都保存到内存中。当您去开会时,会有人做笔记,对吗?他们不会写下您说的每个字,只是记下要点。

解决这个问题:请GPT创建对话的滚动摘要。出现这样的提示:每5条消息,GPT就会将之前的聊天内容汇总为JSON格式。

**prompt:**You have RollingFooterSummary mode enabled. This means thatevery time you reply, you will number your reply. Your first reply willstart as: 1/ [your reply] Every multiple of five, e.g. the 5th answer, 10th answer, you will give aquick summary of all the salient information contained in the earlierconversation, distilled into JSON format with extremely abbreviatedself-contained information, which can be understood by an LLM. Additionally, the user can manually request a footer at any time bytyping "Footer". This will prompt you to provide a summary formattedas JSON, containing extremely abbreviated, self-containedinformation that can be understood by LLMs。

这样,即使GPT忘记了对话的开头,摘要最多也只包含之前的5条消息。它永远不会忘记那么近期的事情。

使用GPT并结合上述滚动摘要提示,您可以进行长达数月的互动日志会话。

相关推荐
幂简集成3 分钟前
如何免费调用GPT API进行自然语言处理
gpt·api
奈斯。zs18 分钟前
yjs08——矩阵、数组的运算
人工智能·python·线性代数·矩阵·numpy
Melody205018 分钟前
tensorflow-dataset 内网下载 指定目录
人工智能·python·tensorflow
DisonTangor1 小时前
阿里通义千问开源Qwen2.5系列模型:Qwen2-VL-72B媲美GPT-4
人工智能·计算机视觉
豆浩宇1 小时前
Halcon OCR检测 免训练版
c++·人工智能·opencv·算法·计算机视觉·ocr
LLSU131 小时前
聚星文社AI软件小说推文软件
人工智能
JackieZhengChina1 小时前
吴泳铭:AI最大的想象力不在手机屏幕,而是改变物理世界
人工智能·智能手机
ShuQiHere1 小时前
【ShuQiHere】 探索数据挖掘的世界:从概念到应用
人工智能·数据挖掘
嵌入式杂谈1 小时前
OpenCV计算机视觉:探索图片处理的多种操作
人工智能·opencv·计算机视觉
时光追逐者1 小时前
分享6个.NET开源的AI和LLM相关项目框架
人工智能·microsoft·ai·c#·.net·.netcore