Building a streaming ChatGPT clone, with Django, Channels, and HTMX

Поделиться
HTML-код
  • Опубликовано: 8 фев 2025

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

  • @czue
    @czue  10 месяцев назад +1

    For those asking for the code, it's hard for me to share the repo since it's built on top of a proprietary product (SaaS Pegasus), but here is a Git patch file of the diffs for the entire video, which should help you apply it to your own Django projects. In addition to this diff you will need to set up a Django project and set up Channels. The full code is also now available in Pegasus.
    gist.github.com/czue/fc37f732f5c70cd16f38819d399b129f

  • @sagartamang0000
    @sagartamang0000 8 месяцев назад

    You sir are a hero! You literally taught me so many things that I was stuck of months!!

  • @thuanquoc1231
    @thuanquoc1231 10 месяцев назад

    Very nice, I will use this as a reference for my future hobby project.

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

    Good video, keep it up!

  • @anze3db
    @anze3db 10 месяцев назад

    This looks great! Great to see a practical example for web sockets with HTMX and Django Channels!

  • @davidbolli4335
    @davidbolli4335 10 месяцев назад

    great video, thanks. I would also be very interested in the repo

    • @czue
      @czue  10 месяцев назад

      See pinned comment.

  • @NoahMasolo
    @NoahMasolo 10 месяцев назад +1

    can you share the repo?

    • @czue
      @czue  10 месяцев назад

      See pinned comment

  • @skaus123
    @skaus123 10 месяцев назад

    Great video. Is there a repo you could share ?

    • @czue
      @czue  10 месяцев назад

      See pinned comment

  • @clearthinking5441
    @clearthinking5441 10 месяцев назад

    This is not async. When would you ever use a chatbot that is not async, doesn't that block the event loop ... ?

    • @GBOAC
      @GBOAC 10 месяцев назад

      Let alone instantiate a client per incoming request

    • @czue
      @czue  10 месяцев назад

      Thanks. Yeah, it should likely be async. It was ported from a more complex example with ORM access and other things that ended up being more trouble than it was worth to troubleshoot and I forgot to swap it back. Hopefully the concepts are helpful even with that oversight. I think most of the value for people and emphasis is on the front end side which doesn't change.

    • @czue
      @czue  10 месяцев назад

      @@GBOAC Can you elaborate on this? Are you referring to the OpenAI client? Pretty sure that's a negligible performance operation.

    • @GBOAC
      @GBOAC 10 месяцев назад

      @@czue for a few users maybe but this doesn’t scale obviously. And is the client async compatible anyway?

    • @czue
      @czue  10 месяцев назад

      @@GBOAC i mean, the client is just a python object that makes web requests. i don't think there's any setup code or anything. and yes it's async compatible.