如何上传文件到ChatGPT(免费版)--分布教程
您是否想要将文件上传到ChatGPT以进行分析?在这篇详细指南中,我们将向您展示一种秘密方法,以绕过ChatGPT的字数限制,使其能够分析较长的输入。通过将数据上传为文件,您可以让ChatGPT在文件上进行训练,提问问题,并进行基于所给训练的有意义的对话。按照以下逐步说明,创建一个ChatGPT文件上传器,并发挥其全部潜力。
-步骤1:
准备您的文件 首先,确保您的文件以纯文本文件格式存在,没有图表或复杂的格式。如果需要,将内容复制并粘贴到类似Notepad(适用于Windows)的纯文本编辑器中。将文件保存为.txt扩展名。
-步骤2:
测试文件上传器 打开ChatGPT,并输入以下命令:“我将给您一个报告文件。我希望您分析其内容,然后我将向您提问,并与之进行互动。” 单击“提交文件”按钮,它将打开Windows文件管理器。选择您准备好的文件。进度条将指示文件的上传和分析进度。
,时长06:06
-步骤3:
进行对话 一旦文件被上传和分析完成,您可以开始与ChatGPT进行有意义的对话。例如,您可以生成与报告相关的问题,要求ChatGPT对目标进行总结,解决报告中的挑战,并提供相应的解决方案。
-步骤4:
创建文件上传按钮 为了简化文件上传过程,我们将使用ChatGPT本身创建一个按钮。复制提供的提示,并将其粘贴到ChatGPT中。提示将指导ChatGPT生成文件上传按钮的代码。检查页面,进入控制台,删除任何错误,粘贴生成的代码,然后按Enter键进行插入。
-步骤5:
测试并保存上传选项 回到ChatGPT界面,您会注意到按钮已经出现了。测试按钮,确保它能够成功打开文件浏览器并上传文件。为了将此上传选项保存以供将来使用,创建一个书签。打开一个新的聊天窗口,并要求ChatGPT将生成的代码转换为书签链接。复制代码,在书签中创建一个新的URL,粘贴代码,并保存。
-步骤6:
将其转换为Chrome插件(可选) 如果您愿意,您可以将文件上传器转换为Chrome插件,以便更轻松地重复使用或与他人分享。复制生成的代码,开始一个新的聊天会话,请求一个带有最少文件的Chrome插件,并获得manifest.json和content.js文件。将原始代码粘贴到content.js中,并保存这些文件。打开扩展程序网页,点击"加载已解压的扩展程序",选择项目文件夹并加载扩展程序。检查是否有错误,并确认后,ChatGPT将生成一个功能正常的Chrome插件。
-步骤7:
自定义块大小(可选) 为了获得更准确的分析结果,您可以调整传输给ChatGPT的块大小。通过将块大小减小到10,000甚至5,000个字符,您可以获得更精确的信息。根据您的需求尝试不同的块大小。
结论:
通过按照这些逐步说明,您可以将文件上传到ChatGPT,并发挥其在标准字数限制之外的分析能力。无论您需要分析报告、了解特定主题,还是进行富有洞察力的对话,ChatGPT的文件上传器都可以帮助您发挥其全部潜力。立即开始使用这个强大的工具,增强您与人工智能的互动体验。
Prompt: "Generate a Js script that creates a button with the text ‘Submit File’ and inserts it into the DOM before an element with the class ‘.flex.flex-col.w-full.py-2.flex-grow.md\:py-3.md\:pl-4’. The button should have a green background color, white text color, 5px padding, no border, 5px border radius and 5px margin. The script should also create a progress element and insert it into the DOM before the same element. The progress element should have a width of 99%, height of 5px and a grey background color. Inside the progress element, there should be another div element representing the progress bar with a width of 0%, height of 100% and blue background color. When the button is clicked, it should create an input element of type ‘file’ that accepts ‘.txt’, ‘.js’, ‘.py’, ‘.html’, ‘.css’, ‘.json’ and ‘.csv’ files. Once a file is selected, using an async it should be read as text and split into chunks of size 15000. using async Each chunk should be submitted into a conversation by doing the following: async function submitConversation(text, part, filename) { const textarea = document.querySelector("textarea[tabindex='0']"); const enterKeyEvent = new KeyboardEvent("keydown", { bubbles: true, cancelable: true, keyCode: 13, }); textarea.value = `Part ${part} of ${filename}: \n\n ${text}`; textarea.dispatchEvent(enterKeyEvent); }. The progress bar should be updated after each chunk is submitted within the for loop as follows progressBar.style.width = `${((i + 1) / numChunks) * 100}%`; and should also check if chatgpt is ready with this code: chatgptReady = false; while (!chatgptReady) { await new Promise((resolve) => setTimeout(resolve, 1000)); chatgptReady = !document.querySelector( ".text-2xl > span:not(.invisible)" Once all chunks have been submitted, the progress bar should turn blue."