AI Blog: OpenAI API (ChatGPT and DALL-E 2) with Google Doc (Google Apps Script)

2022 ж. 30 Жел.
20 354 Рет қаралды

📢 The updated video with GPT-4/GPT 3.5 Turbo 👉🏼 • OpenAI GPT-4/GPT 3.5 T...
In this video, we'll show you how to integrate the OpenAI Chat GPT language model and DALL-E2 with Google Docs using Google Apps Script to generate a blog post with AI assistance. Using the GPT model, you'll be able to input a topic and some initial text, and the model will generate additional content based on that input. With this integration, you'll be able to produce high-quality blog content quickly and easily, all with the help of artificial intelligence. Whether you're a blogger, content creator, or just looking to experiment with AI writing, this tutorial is for you. So watch the video and start generating blog content with the help of OpenAI Chat GPT and Google Docs today!
Generate OpenAI API key from here:
beta.openai.com/account/api-keys
Link to code used:
github.com/MAN1986/LearningOr...
#openai #chatgpt #aiblog #ai

Пікірлер
  • Thanks for sharing. How cool is this. I'm using it right away.

    @gabresieraden@gabresieraden Жыл бұрын
    • Glad you like it!

      @LearningOrbis@LearningOrbis Жыл бұрын
    • hello do you know if i could do the same with an artificial intelligence like mini GPT?

      @SD-rg5mj@SD-rg5mj9 ай бұрын
  • Thanks for linking to your script. I just tried it and it works as intended. I commented out the image generator part as the images I was getting were generally irrelevant or poor and a quick Google image search was easier. As for the text, the script works better for me than the open ai playground web interface (fewer errors) but I seem to be the only person in the world to be unimpressed with the output generated by open ai (worse than the repetitive nonsense churned out by disinterested typers on fiver). I genuinely hope Google filters auto-blogs out of its search results until the technology can proceed beyond forming well written sentences of garbage content, there's more than enough dross on the web already.

    @batchrocketproject4720@batchrocketproject4720 Жыл бұрын
    • Let's hope the next versions are more powerful :)

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Well I'm short of words for your this effort. Thanks so much for bringing this quality stuff. Keep bringing such awesome content.

    @sohailmalik5481@sohailmalik5481 Жыл бұрын
    • Thanks, will do!

      @LearningOrbis@LearningOrbis Жыл бұрын
  • great vid, very helpful and well explained! thx

    @florianstephan5745@florianstephan5745 Жыл бұрын
    • Glad it was helpful!

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Thanks for the video, this gave me an idea. Create a form for potential clients or customers to answer some questions. Use those questions to generate a unique and custom response, email that response to the potential client or customer and invite them to schedule a call.

    @brentmoreno3773@brentmoreno3773 Жыл бұрын
    • Yes of course this can be done.

      @LearningOrbis@LearningOrbis Жыл бұрын
  • it worked! Thank you.

    @vasidq@vasidq Жыл бұрын
    • You're welcome!

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Great work! I was able to tweak the code to now do general commands, text, articles, bullet points and images. I'd like to also do proofread so I can send text for clarity spelling etc. But I can't get passed the max tokens (4097). Is there a way around this, or we have to just use ChatGPT?

    @ianh7301@ianh7301 Жыл бұрын
    • Actually I forgot to mention that OpenAI API gives you free tokens initially and these tokens are used in API calls. I guess then tokens have been consumed. Please check the status of tokens at: beta.openai.com/account/usage

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Wow! This is just awesome 🙌

    @mughees_mirza@mughees_mirza Жыл бұрын
    • Thank you 🙌

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Amazing work ❤️

    @ahsana.lljblfmdjkduglttkse7504@ahsana.lljblfmdjkduglttkse7504 Жыл бұрын
    • Thanks 😄

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Muito obrigado meu amigo! Seu código me ajudou muito!

    @JamesAlgure@JamesAlgure Жыл бұрын
    • fico feliz em saber disso... 🙂

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Thank you very much my friend

    @patriotalliedsolutionsron7438@patriotalliedsolutionsron7438 Жыл бұрын
    • Thank you too 🙂

      @LearningOrbis@LearningOrbis Жыл бұрын
  • hello is it possible to do the same thing with another artificial intelligence? anyway thank you very much for your videos

    @SD-rg5mj@SD-rg5mj9 ай бұрын
    • Hello, What you mean by other AI? Anything having an API can be integrated.

      @LearningOrbis@LearningOrbis9 ай бұрын
    • @LearningOrbis I would like to do images to text, not ocr, but I'm talking about minigpt, I ask him to describe me what's on the image in SEO then he sends all that in a Google sheet as I can do it with chatgpt the API key is a Google sheet module

      @SD-rg5mj@SD-rg5mj9 ай бұрын
    • English Plz

      @LearningOrbis@LearningOrbis9 ай бұрын
  • Great video - Sorry I am super new to this. How do I deploy this, so it's available in google docs?

    @brandingworks@brandingworks Жыл бұрын
    • Thank you. Please follow the steps provided in video.

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Hi how we can made openAI API with Google sheets?

    @payaljindal1621@payaljindal1621 Жыл бұрын
  • Great! Is there a script to just rewrite the headlines or titles of blog too? Can this be added to the current script?

    @MedicalequipmentSpecialists@MedicalequipmentSpecialists Жыл бұрын
    • Thank you. Yes of course we can update the script to include headlines and titles. If you see line number 13 of the code: var prompt = "Generate a detailed full length article about " + selectedText; You can replace the text "Generate a detailed full length article about " to anything like "Generate a detailed full length article with headlines and titles about " or ""Generate a list of ideas about" etc etc.

      @LearningOrbis@LearningOrbis Жыл бұрын
    • @@LearningOrbis That worked great. Think can really expand on this like a get a list of keywords and use those keywords in the blog, etc. So if the script could pull the keywords, from the title or vice versa and create the blog using keywords or some of the keywords or multiple variations

      @MedicalequipmentSpecialists@MedicalequipmentSpecialists Жыл бұрын
    • @@MedicalequipmentSpecialists Apakah bisa digabungkan antara + selectedText dengan Generate a list of ideas about

      @bahyudinnor8650@bahyudinnor8650 Жыл бұрын
  • Hi any idea how to stop the image generation? I've tried commenting out the section but I don't seem to understand it fully cause its still bringing it up. Thank you very much in advance.

    @hoodiegamer9256@hoodiegamer9256 Жыл бұрын
    • NVM it worked after some minutes. Now I'm only getting text generations. Might have been a caching issue or something. Thank you so much.

      @hoodiegamer9256@hoodiegamer9256 Жыл бұрын
    • Happy to know that you got that. By the way, I have another video where I integrated Google Sheet with OpenAI API. There, you have option for text and image separately and you can fill the cells for different prompts and the script will generate the detailed text for all cells individually. Here is link : kzhead.info/sun/bK9ymKhoqYqFgYE/bejne.html

      @LearningOrbis@LearningOrbis Жыл бұрын
  • can you tell what tools you have used for voice?

    @MrMastrahoyaar@MrMastrahoyaar Жыл бұрын
    • Forget about this tool. In few minutes, I am uploading a full tutorial on Text to Speech converter by Microsoft. That is much better than this tool.

      @LearningOrbis@LearningOrbis Жыл бұрын
    • Here it is: kzhead.info/sun/a7yscqenhoKaaHk/bejne.html

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Hi, thank you very, I have that problem: Exception: Hizmet bir gün içinde çok fazla defa çağırıldı: urlfetch. And second question is about Google Sheets. I want to put on a cell it, is it possible? And I need images url, can I take not image only image urls?

    @kus_sevgisi@kus_sevgisi Жыл бұрын
    • This is possible to get it implemented on Google Sheet

      @LearningOrbis@LearningOrbis Жыл бұрын
  • can you customize language when it return information?

    @MrKenzin@MrKenzin Жыл бұрын
    • Hi Thien, I guess this feature is not available yet. But I will check and let you know.

      @LearningOrbis@LearningOrbis Жыл бұрын
  • For some reason if I select even just 2 words from a paragraph of a document, it tries to send the whole document as a prompt. However, if I select a heading, it works just fine. It seems like the script is attaching some "parent text?" to the prompt.

    @thedevo01@thedevo01 Жыл бұрын
    • **The Solution** function myFunction() { var doc = DocumentApp.getActiveDocument(); var selectedElements = doc.getSelection().getRangeElements(); var selectedText = ""; for (var i = 0; i < selectedElements.length; i++) { var element = selectedElements[i].getElement(); if (element.getType() === DocumentApp.ElementType.TEXT) { selectedText += element.asText().getText(); break; } } ... }

      @thedevo01@thedevo01 Жыл бұрын
  • good jop👍

    @mostafagaberahmed6657@mostafagaberahmed6657 Жыл бұрын
  • Is it possible to do this using the iPad google doc app? Or if I set this up on a pc can I use it on an iPad? Will it always consume tokens?

    @jennyhorner@jennyhorner Жыл бұрын
    • Do you see the menu bar on iPad?

      @LearningOrbis@LearningOrbis Жыл бұрын
    • @@LearningOrbis no there’s just a 3 dots thing to press and it doesn’t have the same options

      @jennyhorner@jennyhorner Жыл бұрын
    • What are options you see?

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Also does anyone know an easy way to convert the table output from openai into a table in google docs?

    @ianh7301@ianh7301 Жыл бұрын
    • Ask gpt for that specifically. To produce a table compatible with google docs

      @STG113@STG113 Жыл бұрын
  • 🤯👏

    @hassanniaz7583@hassanniaz7583 Жыл бұрын
  • I'm grateful for your help, but the code does not run directly, it requires authorization, it says "This project requires your permission to access your data." Can this be avoided?

    @asmaaelsawy3025@asmaaelsawy3025 Жыл бұрын
    • You need to allow that.

      @LearningOrbis@LearningOrbis Жыл бұрын
  • I keep getting error TypeError: Cannot read properties of null (reading 'getRangeElements')Details

    @Joehickey52@Joehickey52 Жыл бұрын
    • found answer thanks

      @Joehickey52@Joehickey52 Жыл бұрын
    • Forgot to highlight text

      @Joehickey52@Joehickey52 Жыл бұрын
    • Glad to know that issue is resolved :)

      @LearningOrbis@LearningOrbis Жыл бұрын
  • getting an error "Sk not defined" ???

    @lalitakhade@lalitakhade Жыл бұрын
    • Seems strange. Does it indicate the line number? Can you send the complete error message?

      @LearningOrbis@LearningOrbis Жыл бұрын
  • Why does my google interface says the code that I've put into hasn't been authorized?

    @JerryKerk@JerryKerk Жыл бұрын
    • This is how Google Apps Script works. It issues security warning. Nothing to worry, simply need to authorize.

      @LearningOrbis@LearningOrbis Жыл бұрын
    • @@LearningOrbis Thanks, Now that I’ve saved and run the code, yet my toolbar still hasn’t generated a new menu, do you know what’s that about?

      @JerryKerk@JerryKerk Жыл бұрын
    • Refresh the browser and let me know.

      @LearningOrbis@LearningOrbis Жыл бұрын
    • @@LearningOrbis I’ve refreshed it many times, could it be that there’s something wrong with the code? But it does function. Nothing makes sense here.

      @JerryKerk@JerryKerk Жыл бұрын
    • Can you share the Google Doc link with my id : mahsan.naeem@gmail.com

      @LearningOrbis@LearningOrbis Жыл бұрын
  • I want to change the language

    @user-pe4nm5cq8b@user-pe4nm5cq8b Жыл бұрын
    • Hi, did you get some solution? I got one idea about this.

      @LearningOrbis@LearningOrbis Жыл бұрын
  • I'm missing a step or two, since the blog does not generate content.

    @jaime1007@jaime1007 Жыл бұрын
    • Did you get some error?

      @LearningOrbis@LearningOrbis Жыл бұрын
    • @@LearningOrbis No just it does not load, but then again I am new.

      @jaime1007@jaime1007 Жыл бұрын
    • Generate OpenAI API key from here: beta.openai.com/account/api-keys Go to Doc--> Extension-->Apps Script Copy the code there and replace "YOUR_API_KEY" with the key generated in step-1.

      @LearningOrbis@LearningOrbis Жыл бұрын
    • @@LearningOrbis No my friend it did no work. Maybe I am missing some setting that I don't know.

      @jaime1007@jaime1007 Жыл бұрын
KZhead