ChatGPT in HTMX

Поделиться
HTML-код
  • Опубликовано: 7 июл 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...
  • НаукаНаука

Комментарии • 31

  • @unconv
    @unconv  11 месяцев назад +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 7 месяцев назад +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  7 месяцев назад +1

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

  • @TJTHEFOOTBALLPROPHET
    @TJTHEFOOTBALLPROPHET 10 месяцев назад +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  10 месяцев назад

      Dude! Thank you very much!!

  • @aidrivendesigners
    @aidrivendesigners 11 месяцев назад +1

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

  • @reuna4c3
    @reuna4c3 4 месяца назад

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

  • @ryz177
    @ryz177 10 месяцев назад +2

    Great one! More HTMX please

  • @Jan-jf4th
    @Jan-jf4th 5 месяцев назад +1

    Do one with Golang backend and tailwindCSS for styling.

  • @OlukayodeFadairofatherhero
    @OlukayodeFadairofatherhero 11 месяцев назад

    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 11 месяцев назад

    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  11 месяцев назад

      Thank you so much!

  • @DanMackAlpha
    @DanMackAlpha 9 месяцев назад

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

  • @nathanstanfordsr
    @nathanstanfordsr 7 месяцев назад

    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.

  • @CodeFrontier
    @CodeFrontier 9 месяцев назад

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

    • @unconv
      @unconv  9 месяцев назад +1

      Thank you!

  • @lancemarchetti8673
    @lancemarchetti8673 11 месяцев назад

    Awesome !

  • @sanjayojha1
    @sanjayojha1 11 месяцев назад +1

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

  • @sefaiyi
    @sefaiyi 9 месяцев назад

    nice thank mate

  • @martin-xq7te
    @martin-xq7te 5 месяцев назад

    Brilliant speed coding.

  • @archmad
    @archmad 9 месяцев назад

    this is like going back to the 2000s

    • @unconv
      @unconv  9 месяцев назад

      good old days

  • @chivesltd
    @chivesltd 11 месяцев назад +1

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

    • @unconv
      @unconv  11 месяцев назад

      Just did 🙂

  • @OM-bs7of
    @OM-bs7of 8 месяцев назад

    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 5 месяцев назад

      it's good for BE developers who hate JavaScript

    • @AndersBaumann
      @AndersBaumann 5 месяцев назад

      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 11 месяцев назад

    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  11 месяцев назад +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)