ChatGPT in HTMX

Sdílet
Vložit
  • čas přidán 7. 07. 2023
  • I became an HTMX programmer for a day and created a ChatGPT clone using HTMX and PHP.
    GitHub: github.com/unconv/ChatHTMX
    Support: buymeacoffee.com/unconv
    Consultations: www.buymeacoffee.com/unconv/e...
    Memberships: www.buymeacoffee.com/unconv/m...
  • Věda a technologie

Komentáře • 31

  • @unconv
    @unconv  Před rokem +8

    I forgot to pass the message history to ChatGPT so that it remembers the context. I fixed this in the GitHub repo. Also, the title was created for every new message in a conversation. This is fixed too.

  • @DevanSabaratnam
    @DevanSabaratnam Před 8 měsíci +5

    This was a VERY useful overview of how to use HTMX in an actual app - thank you! Loved the way you left the errors in there too and walked us through the thought process of fixing them.

    • @unconv
      @unconv  Před 8 měsíci +1

      Thanks! I just posted another HTMX video using more of its features :)

  • @TJTHEFOOTBALLPROPHET
    @TJTHEFOOTBALLPROPHET Před rokem +2

    I AM NEVER LEAVING THIS CHANNEL!!!! OMG - I don't have the words to really express how happy I am to have found you - I've been struggling my ass off! THANK YOU FOR CHANGING MY LIFE! MUCH LOVE FROM NEW ORLEANS!

    • @unconv
      @unconv  Před rokem

      Dude! Thank you very much!!

  • @ryz177
    @ryz177 Před 11 měsíci +2

    Great one! More HTMX please

  • @reuna4c3
    @reuna4c3 Před 6 měsíci

    Really nice. And fast as always when you are on the drivers seat. Django backend?🤓

  • @aidrivendesigners
    @aidrivendesigners Před rokem +1

    Absolute Legend!! Sincerely appreciate your tutorials and explanations man you are changing lives out here!

  • @Jan-jf4th
    @Jan-jf4th Před 6 měsíci +1

    Do one with Golang backend and tailwindCSS for styling.

  • @DanMackAlpha
    @DanMackAlpha Před 10 měsíci

    Thanks for this great video. I think this vanilla "php + htmx" recipe demonstrates a fun, quick and easy way to prototype useful apps.

  • @OlukayodeFadairofatherhero

    You are too good. Please another backend with chatgpt and PHP. I am your number 1 fan. I also want to use example with 3.5-turbo with the chatgpt library you built

  • @TheVisitorX
    @TheVisitorX Před rokem

    I love your channel and all your tutorials! Thank you very much for any tutorial you've made! I really like the way you describe things. It is very easy to follow. Never heard of htmx before, it makes things so much easier, without even have to write any single line of JS. Really nice.

    • @unconv
      @unconv  Před rokem

      Thank you so much!

  • @martin-xq7te
    @martin-xq7te Před 6 měsíci

    Brilliant speed coding.

  • @nathanstanfordsr
    @nathanstanfordsr Před 9 měsíci

    I really enjoyed this... hope you make more examples. I would like a simple drag and drop. I want to be able to reorder a list of items and update the database when it is updated.

  • @lancemarchetti8673
    @lancemarchetti8673 Před rokem

    Awesome !

  • @CodeFrontier
    @CodeFrontier Před 10 měsíci

    Your explanation is awesome man!!! 👍 Calm and to the point... 😍

    • @unconv
      @unconv  Před 10 měsíci +1

      Thank you!

  • @sefaiyi
    @sefaiyi Před 10 měsíci

    nice thank mate

  • @sanjayojha1
    @sanjayojha1 Před rokem +1

    flawless, this show how simple and battle tested is PHP. How about using AlpineJs instead of HTMLX?

  • @archmad
    @archmad Před 10 měsíci

    this is like going back to the 2000s

    • @unconv
      @unconv  Před 10 měsíci

      good old days

  • @chivesltd
    @chivesltd Před rokem +1

    thanks for this awesome video, can you make the repo visible to public?

  • @OM-bs7of
    @OM-bs7of Před 9 měsíci

    Htmx looks like the reinvention of the wheel tbh.. many fast and successful websites are already built in react so why htmx?

    • @slappy_chimp
      @slappy_chimp Před 6 měsíci +1

      it's good for BE developers who hate JavaScript

    • @AndersBaumann
      @AndersBaumann Před 6 měsíci

      Because HTMX is much simpler than React. HTMX is perfect for regular websites. The only applications that justifies the complexity of React are web versions of desktop applications like Word and Excel.

  • @keropiboy
    @keropiboy Před rokem

    how is the api key loaded? where do we have to put it? also i get thus error on load: htmx.js:2012 Response Status Error Code 404 from /new_chat.php

    • @unconv
      @unconv  Před rokem +2

      The API key is loaded from an environment variable with getenv("OPENAI_API_KEY"). If you don't know how to set environment variables, you can add a line "putenv('OPENAI_API_KEY=YOUR_API_KEY_HERE');" to ChatGPT.php or hard code the API key in the calls to "new ChatGPT();" instead of using getenv.
      404 means the file was not found, so you are probably not running the app in the root directory (in which case you need to update all the x-post attributes to point to /your/app/uri/file.php or remove the slash from the beginning)