Major kudos for this tutorial, and bonus for including the prompt and code in the description. This vid does a superb job of showing just how powerful ChatGPT is, and your mastery of communicating to ChatGPT.
Dude... I'll be damned if you're going to just walk in here and blow my mind like that. WTF am I even watching right now? Who do you think you are? Is my sense of normalcy just some plaything to you? I'm outraged sir, utterly outraged... at how unbelievably good this video is. Stop being so amazing, it's making the rest of us look ordinary!
0:00 - Introduction 0:31 - Prompt explanation 1:41 - Test file demonstration 2:24 - Converting the code into a bookmarklet 3:22 - Adding the bookmarklet to the browser 4:33 - Using the bookmarklet to add the button 5:08 - Testing the button functionality 5:34 - Adding a delay when stopping response generation 6:12 - Converting the code into a Chrome extension 6:19 - Saving the manifest.json and content.js files 6:52 - Loading the extension in the browser 7:05 - Final test run and conclusion
This is really excellent. I have designed the same process but by using successive API calls for pro projects. Your solution is more elegant and available to users who don't access the API. All the best !!!
Boi, I seen a lot of grifters hopping on that AI trend. Claiming to teach you "the ultimate prompt", the secret of ChatGPT and whatnot...but THIS is the real deal !! Next level ingenuity ! Congrats to you !
Hi everyone, looks like the ChatGPT site was updated today, I have applied the fix and the plugin should be working now. Thanks to those of you who notified me!...oh yea, I also added support for Excel files. Enjoy!
@automatemylife00 For some reason, large files that need to be split are not being input piece by piece into ChatGPT (figured this out form testing / debugging). In other words, only Part 1 is being input. Any suggestions / solutions?
Great video! The question is - did You test chat gpt memory? That's great solutions, but probably when you ask chat about information from the beggining of your long file then it will start hallucinate.
@@automatemylife00 It doesn't... the hard limit (for now) is 8K tokens (4K for GPT 3.5). Anthropic has a context token limit of 100K but it is weak compared to GPT.
Your videos are so educational! 1. You have a real talent for explaining complex ideas in an easy-to-understand way. 2. Your content is so informative and well-researched. 3. I always learn something new from your videos. 4. Thank you for sharing your knowledge with us! 5. Your videos are a great resource for anyone looking to learn about [topic]. 6. You have a real gift for teaching through video. 7. Your channel is a must-watch for anyone interested in [topic]. 8. I appreciate all the hard work you put into making such informative videos. 9. Your dedication to providing accurate and helpful information is inspiring.
Another 'poor man's option' instead of bookmark buttons and extensions that disappear would be wrapping it in a Tampermonkey script that always loads for the site. Also makes it easier to tweak and eyeball things.
Why does noone mention the fact that ChatGPT can only handle 4096 tokens? So if the message is too long and you split it up into parts, it will only remember the last part
Thanks! Check out this video : ua-cam.com/video/wiw0JyzNdVM/v-deo.html and see if it resolves the issue you are experiencing. Also keep in mind that you could also use the Chatgpt file uploader plugin if you just need to use it: ChatGPT File Uploader tinyurl.com/5n7rjhar
Great content ! If you are trying to replicate this, just a few precisions that I think can help : The selector provided by chatGPT might not always work as expected. You can replace it with this one: "div.relative.flex.h-full.max-w-full.flex-1.overflow-hidden > div > main > div.absolute.bottom-0 > form > div > div:nth-child(1)". Also, keep in mind that the bookmarklet code has a character limit of 2000. If you encounter any errors with the generated code, consider minifying it to fit within this limit.
same thing here, if any of you can send us the revised code or where exactly we have to insert your line that would be great. For me it is just uploading the first part and then stops !!!
I have been using this since it came out and today the button is gone. I cant seem to get it back with either the plug in or putting the code directly into the page. Any advice
@@automatemylife00 Thanks for your quick response and fix. I can confirm the button is back! Thanks for your continued support and help in the community.
Man, it seems like these AI tools are getting so out of control, that if you don't use them to your own advantage, you will be left so far behind everyone else. To be fair, it's really good for content creators (and more so if you use with Famester Social). You can create content, make it go popular straight away. I like where is this going, my only worry is that maybe some people would lose their jobs.
This is astounding! Is there a way to create an external memory / access a database to retrieve info? That would be amazing! Really great work. Subscribed! :)
VM67:28 Uncaught TypeError: Cannot read properties of null (reading 'parentNode') at :28:15 (anonymous) @ VM67:28 _app-de11afa369c8a1b8.js:14 react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard. I am getting this error
Check out this video : ua-cam.com/video/wiw0JyzNdVM/v-deo.html and see if it resolves the issue you are experiencing. Also keep in mind that you could also use the Chatgpt file uploader plugin if you just need to use it: ChatGPT File Uploader tinyurl.com/5n7rjhar
Can you make it “see” images. Like flow charts? And or make it give us images? I know a plug-in coming for this feature but waitlists don’t like me lol
Great stuff. Thanks. This is a supper useful addition. Please keep up the good work. Any chance it will be able to be able to do this with PDF files?? Or YT videos?
I really would appreciate if you could upload a version of your plugin that is able to read pdf and maybe word files (although these can be easily transfered to txt.) Thank you in advance. Another question: I need gpt to analyze the content of the pdf/txt whatever files with some regulatory documents. Copying small chunks of text already works excellent but I need to upload huge files of text. so if you can programm something like this I am willing to make it worth you`re while.
Check out this video : ua-cam.com/video/wiw0JyzNdVM/v-deo.html and see if it resolves the issue you are experiencing. Also keep in mind that you could also use the Chatgpt file uploader plugin if you just need to use it: ChatGPT File Uploader tinyurl.com/5n7rjhar
I like to first delete all whitespaces and then tell it that i deleted all whitespaces in order to save tokens. With Python code its maybe not so optimal but with ';' ending code its perfect for getting a way bigger context on your codebase
I created a similar script that breaks large prompts into chunks except that you don't even need to hit the "Stop generating" button, it's completely autonomous and it will just wait for part 2, 3, 4 and so on until it completes the process. Then after completion, ChatGPT will ask how it can help you. Right now its just a basic python script but I do want to make into a chrome extension. I'm not a coder or anything so ChatGPT managed to help me get as far as I could with it. Perhaps I will upload a video showcasing it. Edit: I just uploaded a short video showcasing the script in case anyone is interested.
may i suggest waiting for "Confirmed" from Chatgpt before input the next chunk of the text. This way it allows Chatgpt to process the information so that it can be utilize and etc.
Is it placing this code in a console? Pressing enter key // Create the button const submitButton = document.createElement('button'); submitButton.textContent = 'Submit File'; submitButton.style.backgroundColor = 'green'; submitButton.style.color = 'white'; submitButton.style.padding = '5px'; submitButton.style.border = 'none'; submitButton.style.borderRadius = '5px'; submitButton.style.margin = '5px'; // Create the progress element const progressElement = document.createElement('progress'); progressElement.style.width = '99%'; progressElement.style.height = '5px'; progressElement.style.backgroundColor = 'grey'; // Create the progress bar const progressBar = document.createElement('div'); progressBar.style.width = '0%'; progressBar.style.height = '100%'; progressBar.style.backgroundColor = 'blue'; // Append the progress bar to the progress element progressElement.appendChild(progressBar); // Find the target element to insert before const targetElement = document.querySelector('.flex.flex-col.w-full.py-2.flex-grow.md\\:py-3.md\\:pl-4'); // Insert the button and progress element before the target element targetElement.parentNode.insertBefore(progressElement, targetElement); targetElement.parentNode.insertBefore(submitButton, targetElement); // Add click event listener to the button submitButton.addEventListener('click', async function () { // Create the file input element const fileInput = document.createElement('input'); fileInput.type = 'file'; fileInput.accept = '.txt, .js, .py, .html, .css, .json, .csv'; // Listen for file selection fileInput.addEventListener('change', async function (event) { const file = event.target.files[0]; const reader = new FileReader(); // Read the file as text reader.readAsText(file); reader.onload = async function () { const text = reader.result; // Split text into chunks const chunkSize = 15000; const numChunks = Math.ceil(text.length / chunkSize); let chatgptReady = false; for (let i = 0; i < numChunks; i++) { const start = i * chunkSize; const chunk = text.slice(start, start + chunkSize); const part = i + 1; const filename = file.name; const chunkWithMessage = `Do not respond with anything other than to acknowledge that you have received this chunk of the file.
Part ${part} of ${numChunks}:
${chunk}`; // Submit chunk to conversation await submitConversation(chunkWithMessage, part, filename); // Update progress bar progressBar.style.width = `${((i + 1) / numChunks) * 100}%`; // Check if chatgpt is ready while (!chatgptReady) { await new Promise((resolve) => setTimeout(resolve, 1000)); chatgptReady = !document.querySelector('.text-2xl > span:not(.invisible)'); } } // Set progress bar to blue when all chunks are submitted progressBar.style.backgroundColor = 'blue'; }; }); // Trigger file input click fileInput.click(); }); // Function to submit conversation 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}:
In my tests, I've found that chunking doesn't get around the context limits. It works to get summaries, but the earlier chunks will fall out of memory.
But whats the point. If you tell it to optimise or do something with all of the code, it simply cannot do that. Because 15000 character in 3 parts or 45000 characters, it can't store at once to analyse. So what's the point ?
Great work.... I was running into a small error creating the bookmarklet... Figured out it does not like comments like // removing comments from code and it works now I added some file types i needed ;) Not I need to figure out to download the new file as well and we will really have something cooking
If the code it produced for you worked, why not provide that code instead of the prompt to generate that code? When I supplied it with your prompt, I got a slightly different result each time I submitted it. Some of them did create a submit button but without the ability to continue for file sizes over 15000. Some generated errors and no submit button at all.
I'm so happy I made productive decisions about my finances that changed my life forever,hoping to retire next year... Investment should always be on any creative man's heart for success in life.
I agree with you and believe that the secret to financial stability is having the right investment ideas to enable you earn more money, I don't know who agrees with me but either way I recommend real estate or crypto and stocks.
Yeah!! It would be more beneficial and yield more profit if you actually trade on cryptocurrency, I've been trading since the dip, I've made so much profit trading.
I was trading fairly a small account and I got over 200% within one month. We need more traders like him in the space to guide the teeming population of crypto enthusiasts and traders out there
Major kudos for this tutorial, and bonus for including the prompt and code in the description. This vid does a superb job of showing just how powerful ChatGPT is, and your mastery of communicating to ChatGPT.
Glad you liked it!
Dude... I'll be damned if you're going to just walk in here and blow my mind like that. WTF am I even watching right now? Who do you think you are? Is my sense of normalcy just some plaything to you? I'm outraged sir, utterly outraged... at how unbelievably good this video is. Stop being so amazing, it's making the rest of us look ordinary!
That was funny, thanks for the kind words.
0:00 - Introduction
0:31 - Prompt explanation
1:41 - Test file demonstration
2:24 - Converting the code into a bookmarklet
3:22 - Adding the bookmarklet to the browser
4:33 - Using the bookmarklet to add the button
5:08 - Testing the button functionality
5:34 - Adding a delay when stopping response generation
6:12 - Converting the code into a Chrome extension
6:19 - Saving the manifest.json and content.js files
6:52 - Loading the extension in the browser
7:05 - Final test run and conclusion
Probably AI generated, but as I'm on mobile right now, this is very appreciated.
Thank you my good sir.
This is really excellent. I have designed the same process but by using successive API calls for pro projects. Your solution is more elegant and available to users who don't access the API. All the best !!!
Pierre - did you find yourself going with this solution or still doing it the API route?
Boi, I seen a lot of grifters hopping on that AI trend. Claiming to teach you "the ultimate prompt", the secret of ChatGPT and whatnot...but THIS is the real deal !! Next level ingenuity ! Congrats to you !
Dude. Browser Injection? Mindblowing.
Hi everyone, looks like the ChatGPT site was updated today, I have applied the fix and the plugin should be working now. Thanks to those of you who notified me!...oh yea, I also added support for Excel files. Enjoy!
where can I find the plugin that you've updated?
Thank you.
@@darvski the link is in the description as well : tinyurl.com/5n7rjhar
Does not work at all
Bro this is high quality stuff. You taught me something I didn’t know I could do with this
However please be catious sending private info
@@SpookyKillerz😢 please explain how and more on this
@@audiophile... keys and passwords and such
I've seen and followed many AI people channels and this channel is by far the best one I came across. Keep up the good work!
Thanks, I appreciate that!
@@automatemylife00 Thank you! The differential is that you shows what went wrong as well.
seriously.
This channel is simply run by brilliant web developer 💯👏🔥
@automatemylife00
For some reason, large files that need to be split are not being input piece by piece into ChatGPT (figured this out form testing / debugging). In other words, only Part 1 is being input.
Any suggestions / solutions?
Your a Blessing from the Heaves Above!
Skill level 100, Value level 1000 !! Amazing work
I am so glad i came across your channel,I love yyour content and guidelines.I am busy with a project ,just trying it out and prompting
Great video! The question is - did You test chat gpt memory? That's great solutions, but probably when you ask chat about information from the beggining of your long file then it will start hallucinate.
good point, Chatgpt still has its limitations but perhaps feeding Chatgpt smaller chunks at a time will help it maintain its focus.
@@automatemylife00 It doesn't... the hard limit (for now) is 8K tokens (4K for GPT 3.5). Anthropic has a context token limit of 100K but it is weak compared to GPT.
@@jim77004 I've tried that tool, but I have no idea how to summit the file into Claude, could you share the tips?
love you man you are awsome!!!
Wow. This channel is so underrated.
This is the most unique yt gpt channel out there.
Thanks I appreciate that!
That was excellent. Well done. Thank you.
The fact you did this without GPT-4 makes it much more impressive.
This was GPT 3
3.5 free
Thanks man. This is really helpful. Just unlocked a whole new domain of things that I now know are possible. Thanks again.
Dude. I did'nt know you could do these things in the browser, nevermind with ChatGPT. Super educational, valuable content! Subscribed.
JavaScript
works pretty well good job man!
Thank you Sir! This was an eye opener for me - brilliant. You have really broadened my understanding of everything ChatGPT.
this just blew my mind. thanks for the share
Your videos are so educational!
1. You have a real talent for explaining complex ideas in an easy-to-understand way.
2. Your content is so informative and well-researched.
3. I always learn something new from your videos.
4. Thank you for sharing your knowledge with us!
5. Your videos are a great resource for anyone looking to learn about [topic].
6. You have a real gift for teaching through video.
7. Your channel is a must-watch for anyone interested in [topic].
8. I appreciate all the hard work you put into making such informative videos.
9. Your dedication to providing accurate and helpful information is inspiring.
Bro used chatGPT to come up with 9 reasons
@@mohammad81295
That's pretty clever, I'm impressed
Biggest problem is how many tokens it can remember from the conversation, meaning eventually the oldest messages will be lost in its memory
This
Yah, it basically has to be used as zero-shot and just summarize per chunk.
Another 'poor man's option' instead of bookmark buttons and extensions that disappear would be wrapping it in a Tampermonkey script that always loads for the site. Also makes it easier to tweak and eyeball things.
Brilliant. Smarty pants. Appreciate your time and insight into this method.
Thanks! I'm glad you enjoyed it.
Why does noone mention the fact that ChatGPT can only handle 4096 tokens? So if the message is too long and you split it up into parts, it will only remember the last part
Novice here and this video make my brain spark with curiosity.
Such a brilliantly clear walk through. Thank you.
The idea of the Google extension is very good I would like to see more extensions I thank you for your time
this is great! mainly since this shows you can use ChatGPT itself to make an extension that improves the ChatGPT experience. Nice 👍👍
Oh i wasn't expecting to get a heart, thanks! ❤️
However please be cautious sending private info
@@SpookyKillerz Just disable chat history.
@@ibrahimdevx and you trust them from removing it? They scraped the whole internet and changed from non-profit to for-profit
WOW, great prompt man
This is awesome but I kept on getting an error message: VM195:29 Uncaught TypeError: Cannot read properties of null (reading 'parentNode')
at :29:15
Thanks! Check out this video : ua-cam.com/video/wiw0JyzNdVM/v-deo.html
and see if it resolves the issue you are experiencing. Also keep in mind that you could also use the Chatgpt file uploader plugin if you just need to use it:
ChatGPT File Uploader
tinyurl.com/5n7rjhar
@@automatemylife00 Thank you! I will go through your video and give it a try!
it's so cool i can't wait to try it by myself right now
Great content !
If you are trying to replicate this, just a few precisions that I think can help :
The selector provided by chatGPT might not always work as expected. You can replace it with this one: "div.relative.flex.h-full.max-w-full.flex-1.overflow-hidden > div > main > div.absolute.bottom-0 > form > div > div:nth-child(1)".
Also, keep in mind that the bookmarklet code has a character limit of 2000. If you encounter any errors with the generated code, consider minifying it to fit within this limit.
I had to re run the propt using your selector advice, thanks so much is working now
can you repost the code now for us stupid ones? I am not sur exactly where to insert the correction. Thank you!!!
same thing here, if any of you can send us the revised code or where exactly we have to insert your line that would be great. For me it is just uploading the first part and then stops !!!
Alban, Thank you sooooo much
@@Eagleeyekiller Hey buddy, use this,
// Create button element
const button = document.createElement('button');
button.innerText = 'Submit File';
button.style.backgroundColor = 'green';
button.style.color = 'white';
button.style.padding = '5px';
button.style.border = 'none';
button.style.borderRadius = '5px';
button.style.margin = '5px';
// Create progress element
const progress = document.createElement('div');
progress.style.width = '99%';
progress.style.height = '5px';
progress.style.backgroundColor = 'grey';
// Create progress bar inside progress element
const progressBar = document.createElement('div');
progressBar.style.width = '0%';
progressBar.style.height = '100%';
progressBar.style.backgroundColor = 'blue';
// Append progress bar to progress element
progress.appendChild(progressBar);
// Find the element to insert before
const targetElement = document.querySelector('div.relative.flex.h-full.max-w-full.flex-1.overflow-hidden > div > main > div.absolute.bottom-0 > form > div > div:nth-child(1)');
// Insert button and progress elements before the target element
targetElement.parentNode.insertBefore(button, targetElement);
targetElement.parentNode.insertBefore(progress, targetElement);
// File types to accept
const acceptedFileTypes = ['.txt', '.js', '.py', '.ipynb', '.html', '.css', '.json', '.csv'];
// File input change event handler
button.addEventListener('click', function () {
const fileInput = document.createElement('input');
fileInput.type = 'file';
fileInput.accept = acceptedFileTypes.join(',');
fileInput.addEventListener('change', async function (event) {
const file = event.target.files[0];
const filename = file.name;
// Read the file as text
const reader = new FileReader();
reader.onload = async function (event) {
const fileContent = event.target.result;
const chunkSize = 15000;
const numChunks = Math.ceil(fileContent.length / chunkSize);
// Submit each chunk as a conversation
for (let i = 0; i < numChunks; i++) {
const start = i * chunkSize;
const chunk = fileContent.slice(start, start + chunkSize);
const part = i + 1;
// Submit conversation chunk
await submitConversation(chunk, part, filename);
// Update progress bar
progressBar.style.width = `${((i + 1) / numChunks) * 100}%`;
}
// Check if chatgpt is ready
let chatgptReady = false;
while (!chatgptReady) {
await new Promise((resolve) => setTimeout(resolve, 1000));
chatgptReady = !document.querySelector('.text-2xl > span:not(.invisible)');
}
// Update progress bar to turn blue
progressBar.style.backgroundColor = 'blue';
};
// Read the file as text
reader.readAsText(file);
});
// Trigger file input dialog
fileInput.click();
});
// Function to submit conversation chunk
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}:
${text}`;
textarea.dispatchEvent(enterKeyEvent);
}
love u boss
Wow! I'll learn a lot by going through this tutorial step by step. I didn't know about Bookmarklets. Thanks a lot.
This is really awesome
No words to say . Really amazing and great!
Love the content! Just subbed
I have been using this since it came out and today the button is gone. I cant seem to get it back with either the plug in or putting the code directly into the page. Any advice
Yes, the plugin is no longer working. I am trying to figure out what is the culprit. Openai or Chrome? Unknown at this point.
I have updated the plugin, it should be working within 24hrs (google web store has to approve the update)
@@automatemylife00 Thanks for your quick response and fix. I can confirm the button is back! Thanks for your continued support and help in the community.
excellent stuff, thanks for this
Glad you enjoyed it!
Man, it seems like these AI tools are getting so out of control, that if you don't use them to your own advantage, you will be left so far behind everyone else. To be fair, it's really good for content creators (and more so if you use with Famester Social). You can create content, make it go popular straight away. I like where is this going, my only worry is that maybe some people would lose their jobs.
I appreciate the honesty, and agreed it would be tough when lot of people start getting fired and bots come in their place.
yo, totally agree
great information. i just got subscribed love your contents
This is astounding! Is there a way to create an external memory / access a database to retrieve info? That would be amazing! Really great work. Subscribed! :)
Following!
Following
prompt it my friend! prompt it!
@@garrettmarsh1102 im all ears on this one
One of use should try and reply here
are you kidding me! this is awesome!
VM67:28 Uncaught TypeError: Cannot read properties of null (reading 'parentNode')
at :28:15
(anonymous) @ VM67:28
_app-de11afa369c8a1b8.js:14 react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.
I am getting this error
Check out this video : ua-cam.com/video/wiw0JyzNdVM/v-deo.html
and see if it resolves the issue you are experiencing. Also keep in mind that you could also use the Chatgpt file uploader plugin if you just need to use it:
ChatGPT File Uploader
tinyurl.com/5n7rjhar
Can you make it “see” images. Like flow charts? And or make it give us images? I know a plug-in coming for this feature but waitlists don’t like me lol
This is probably the most useful UA-cam clip I have seen in my life, thanks for this
Great stuff. Thanks. This is a supper useful addition. Please keep up the good work. Any chance it will be able to be able to do this with PDF files?? Or YT videos?
Wow! such a relaxing voice, teaching us how to automate GPT!
Subscribed! New Fan!
Thank you!
This tutorial is freaking AMZING !!! Thanks so much !
I really would appreciate if you could upload a version of your plugin that is able to read pdf and maybe word files (although these can be easily transfered to txt.) Thank you in advance. Another question: I need gpt to analyze the content of the pdf/txt whatever files with some regulatory documents. Copying small chunks of text already works excellent but I need to upload huge files of text. so if you can programm something like this I am willing to make it worth you`re while.
CTRL+A CTRL+C CTRL+V
Liked (loved!) and subscribed. That was bad ass my man. 👊🏼
OMFG and made all with the same chatgpt? 🤯
Ican't wait to finish the job to try it!
Thanks for the excellent content and greetings for everyone! ✌🇲🇽
I was completely unaware that this was possible with ChatGPT - Awesome Tutorial.
here is an updated booklet that works now:
javascript:(function() { const button = document.createElement("button"); button.textContent = "Submit File"; button.style.backgroundColor = "green"; button.style.color = "white"; button.style.padding = "5px"; button.style.border = "none"; button.style.borderRadius = "5px"; button.style.margin = "5px"; const progressElement = document.createElement("progress"); progressElement.style.width = "99%"; progressElement.style.height = "5px"; progressElement.style.backgroundColor = "grey"; const progressBar = document.createElement("div"); progressBar.style.width = "0%"; progressBar.style.height = "100%"; progressBar.style.backgroundColor = "blue"; progressElement.appendChild(progressBar); const targetElement = document.querySelector('.flex.flex-col.w-full.py-\\[10px\\].flex-grow.md\\:py-4.md\\:pl-4.relative.border.border-black\\/10.bg-white.dark\\:border-gray-900\\/50.dark\\:text-white.dark\\:bg-gray-700.rounded-xl.shadow-xs.dark\\:shadow-xs'); if (targetElement) { targetElement.parentNode.insertBefore(progressElement, targetElement); targetElement.parentNode.insertBefore(button, targetElement); } else { console.error("Target element not found!"); } 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}:
${text}`; textarea.dispatchEvent(enterKeyEvent); } button.addEventListener("click", async () => { const fileInput = document.createElement("input"); fileInput.type = "file"; fileInput.accept = ".txt, .js, .py, .html, .css, .json, .csv"; fileInput.click(); fileInput.addEventListener("change", async (event) => { const file = event.target.files[0]; const filename = file.name; const reader = new FileReader(); reader.onload = async (e) => { const fileContent = e.target.result; const chunks = chunkString(fileContent, 15000); const numChunks = chunks.length; let progress = 0; for (let i = 0; i < numChunks; i++) { const chunk = chunks[i]; await submitConversation(chunk, i + 1, filename); progress = ((i + 1) / numChunks) * 100; progressBar.style.width = `${progress}%`; let chatgptReady = false; while (!chatgptReady) { await new Promise((resolve) => setTimeout(resolve, 1000)); chatgptReady = !document.querySelector(".text-2xl > span:not(.invisible)"); } } progressBar.style.backgroundColor = "blue"; }; reader.readAsText(file); }); }); function chunkString(str, size) { const numChunks = Math.ceil(str.length / size); const chunks = new Array(numChunks); for (let i = 0, o = 0; i < numChunks; ++i, o += size) { chunks[i] = str.substr(o, size); } return chunks; }})();
this really works! Thanx a lot!
Fell in love with your video.
Can you please tell me the background music name I really liked it.
it is Showing this error : Uncaught TypeError: Cannot read properties of null (reading 'parentNode') what should I do now ?
Check out this video : ua-cam.com/video/wiw0JyzNdVM/v-deo.html
and see if it resolves the issue you are experiencing. Also keep in mind that you could also use the Chatgpt file uploader plugin if you just need to use it:
ChatGPT File Uploader
tinyurl.com/5n7rjhar
I like to first delete all whitespaces and then tell it that i deleted all whitespaces in order to save tokens.
With Python code its maybe not so optimal but with ';' ending code its perfect for getting a way bigger context on your codebase
Great tip, thanks!
I created a similar script that breaks large prompts into chunks except that you don't even need to hit the "Stop generating" button, it's completely autonomous and it will just wait for part 2, 3, 4 and so on until it completes the process. Then after completion, ChatGPT will ask how it can help you. Right now its just a basic python script but I do want to make into a chrome extension. I'm not a coder or anything so ChatGPT managed to help me get as far as I could with it. Perhaps I will upload a video showcasing it.
Edit: I just uploaded a short video showcasing the script in case anyone is interested.
send me this lol
@@Swalla I have a video on my channel that will include it.
bro ,you made my day
Nice. I’ve been trying to figure out how to code something like this for weeks now. 👍🏾
bro, this is gold, thank you
This is phenomenal work. I subscribed immediately.❤
Me too 😮
Great content. very informative. However, I'm on a macbook pro. 2:29 right click isn't giving me that drop down menu. What am I doing wrong?
To open the last DevTools panel, click the Three-dot menu. button to the right of the address bar and select More Tools > Developer Tools.
It's great, but can you include the ability to use .pdf .doc or .docx files also.
I will look into adding that.
@@automatemylife00 Please do it ASAP!
damn! ! ! this is freakin' AWESOME! ! !
may i suggest waiting for "Confirmed" from Chatgpt before input the next chunk of the text. This way it allows Chatgpt to process the information so that it can be utilize and etc.
Is it placing this code in a console? Pressing enter key
// Create the button
const submitButton = document.createElement('button');
submitButton.textContent = 'Submit File';
submitButton.style.backgroundColor = 'green';
submitButton.style.color = 'white';
submitButton.style.padding = '5px';
submitButton.style.border = 'none';
submitButton.style.borderRadius = '5px';
submitButton.style.margin = '5px';
// Create the progress element
const progressElement = document.createElement('progress');
progressElement.style.width = '99%';
progressElement.style.height = '5px';
progressElement.style.backgroundColor = 'grey';
// Create the progress bar
const progressBar = document.createElement('div');
progressBar.style.width = '0%';
progressBar.style.height = '100%';
progressBar.style.backgroundColor = 'blue';
// Append the progress bar to the progress element
progressElement.appendChild(progressBar);
// Find the target element to insert before
const targetElement = document.querySelector('.flex.flex-col.w-full.py-2.flex-grow.md\\:py-3.md\\:pl-4');
// Insert the button and progress element before the target element
targetElement.parentNode.insertBefore(progressElement, targetElement);
targetElement.parentNode.insertBefore(submitButton, targetElement);
// Add click event listener to the button
submitButton.addEventListener('click', async function () {
// Create the file input element
const fileInput = document.createElement('input');
fileInput.type = 'file';
fileInput.accept = '.txt, .js, .py, .html, .css, .json, .csv';
// Listen for file selection
fileInput.addEventListener('change', async function (event) {
const file = event.target.files[0];
const reader = new FileReader();
// Read the file as text
reader.readAsText(file);
reader.onload = async function () {
const text = reader.result;
// Split text into chunks
const chunkSize = 15000;
const numChunks = Math.ceil(text.length / chunkSize);
let chatgptReady = false;
for (let i = 0; i < numChunks; i++) {
const start = i * chunkSize;
const chunk = text.slice(start, start + chunkSize);
const part = i + 1;
const filename = file.name;
const chunkWithMessage = `Do not respond with anything other than to acknowledge that you have received this chunk of the file.
Part ${part} of ${numChunks}:
${chunk}`;
// Submit chunk to conversation
await submitConversation(chunkWithMessage, part, filename);
// Update progress bar
progressBar.style.width = `${((i + 1) / numChunks) * 100}%`;
// Check if chatgpt is ready
while (!chatgptReady) {
await new Promise((resolve) => setTimeout(resolve, 1000));
chatgptReady = !document.querySelector('.text-2xl > span:not(.invisible)');
}
}
// Set progress bar to blue when all chunks are submitted
progressBar.style.backgroundColor = 'blue';
};
});
// Trigger file input click
fileInput.click();
});
// Function to submit conversation
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}:
${text}`;
textarea.dispatchEvent(enterKeyEvent);
}
Wow. This is great. Thank you. Subscribed.
Improvement. When you know the amount of chunks you can tell Chat-GPT to wait for all parts and the word #FINISHED# to avoid answers to every chunk.
In my tests, I've found that chunking doesn't get around the context limits. It works to get summaries, but the earlier chunks will fall out of memory.
@@jim77004 Ive used prompts to they memorize and just say read until i finished
But I don't know how long it takes.
I'd be interested, too, if somebody finds our how to avoid answers to every chunk.
@@jim77004 that’s my experience, too. Can anyone provide clarity on this topic?
This is over my head! I will send it to my son he willl break it down for me.
We built Tammy AI to allow users to save summaries online so that they do not need to worry about downloading files.
is it just youtube summaries?
@@aa898246 for the moment. more interesting products in the pipeline.
@@SteveMoore-n1v I was gonna joke about it too, but I respect the honesty of your reply
There seems to be an issue with the code. A few days ago it worked properly, today it isn't working anymore.
But whats the point. If you tell it to optimise or do something with all of the code, it simply cannot do that. Because 15000 character in 3 parts or 45000 characters, it can't store at once to analyse. So what's the point ?
This is awesome!
Great work.... I was running into a small error creating the bookmarklet... Figured out it does not like comments like // removing comments from code and it works now I added some file types i needed ;)
Not I need to figure out to download the new file as well and we will really have something cooking
Thank you so much. It helps me a lot.
You're welcome!
The was amazing!! Is it possible to make it possible to upload pdf files? Given that the pdf format is much more complex, do you think it is possible?
Really like this content. Ty
If the code it produced for you worked, why not provide that code instead of the prompt to generate that code? When I supplied it with your prompt, I got a slightly different result each time I submitted it. Some of them did create a submit button but without the ability to continue for file sizes over 15000. Some generated errors and no submit button at all.
He provided the plugin in the description. Isn't that enough?
GPT-4 struggles with this prompt, tried 4 times. Tried once with GPT-3.5, worked instantly.
This will go viral if someone posts it in reddit.
…and thus prevented by strict alignment in a week. Keep it down law 😂
My reddit bot already has posted it
@@bestbotreview please teach me how to make bot 😊
Dont
God no, that place is a bunch of toxic incel lurkers & sensitive soy people. Too many extremes, I stay away.
Now that's ingenious... 😲🤓
I'm so happy I made productive decisions about my finances that changed my life forever,hoping to retire next year... Investment should always be on any creative man's heart for success in life.
I agree with you and believe that the secret to financial stability is having the right investment ideas to enable you earn more money, I don't know who agrees with me but either way I recommend real estate or crypto and stocks.
Yeah!! It would be more beneficial and yield more profit if you actually trade on cryptocurrency, I've been trading since the dip, I've made so much profit trading.
I'm honestly surprised that this name is being mentioned here, I stumbled upon one of his clients testimony last week in CNBC world news
Well, you are saying the fact. I invested $4,000 with fergus Waylen. and earned $12,000 in 7 working days.
I was trading fairly a small account and I got over 200% within one month. We need more traders like him in the space to guide the teeming population of crypto enthusiasts and traders out there
The background music is really good
Your voice calms me down
haha thanks!
This is great! Thank you bro
this is insane homie thanks
yo thank you so much for this amazing video you helped me so much this is the best ai tutorial video iv'e seen thanks and ofc you've earned a follow😁
Thanks!
this is revolutionary
I love automation, I tip my hat to you. Thanks!
thank you!! SO MUCH... Cheers from 🇧🇷 !
You're welcomed! Thanks for stopping by.
this great! thanks bro; it save time.
Ingenious! 👍
Thanks!
This is awesome! Thanks mate :)
NEXT LEVEL!! 🎉💥👏🏻💯
This is amazing man.
Good stuff thanks for sharing