Learn Rust OpenAI API - Building AI Buddy from Scratch!!!

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น • 31

  • @ryz177
    @ryz177 10 หลายเดือนก่อน +2

    This should get millions of views! Kudos to the GOAT of Rust!

  • @prashlovessamosa
    @prashlovessamosa 11 หลายเดือนก่อน +2

    Quality of your teaching is just mind blowing 😉.

  • @gertrudessampaio8689
    @gertrudessampaio8689 11 หลายเดือนก่อน +3

    That was awesome, I'm excited for production with Axum to integrate an assistant into websites. Merry Christmas, Jeremy

    • @JeremyChone
      @JeremyChone  11 หลายเดือนก่อน +2

      Merry Christmas to you too.
      Yes, in the rust-web-app, we will introduce the `Agent` concept, which is essentially a multi-user version of the `Buddy`. However, the overall concept remains the same.

  • @hung-hanchen774
    @hung-hanchen774 11 หลายเดือนก่อน +2

    Longtime follower here, thanks (again) for the video, I have also written a tutorial on how to build an AI copilot, the tutorial focuses on local LLM (not OpenAI) and obviously I am still a Rust beginner so learning while writing. 😊

    • @WildlyFunnyFacts
      @WildlyFunnyFacts 11 หลายเดือนก่อน

      Can you send it and give me review about it I mean did you get good value

  • @maxali6591
    @maxali6591 11 หลายเดือนก่อน +4

    The work you've done is a great present for Christmas.
    Thanks a lot! 😊😊

    • @JeremyChone
      @JeremyChone  11 หลายเดือนก่อน +1

      Yes, this was target! Cool you are liking it.
      Any feedback on the video very welcome!
      Happy coding!

  • @cutimacutinocutilo
    @cutimacutinocutilo หลายเดือนก่อน

    Great video to learn rust. Did you plan to share testing best practices? I invite you to creat a video adding tests to this project.

  • @databasemadness
    @databasemadness 9 หลายเดือนก่อน +1

    Pure quality!

  • @damoon_az2465
    @damoon_az2465 11 หลายเดือนก่อน +1

    Amazing video. Can you please share the list of VSCode extensions you find most useful ?

    • @JeremyChone
      @JeremyChone  11 หลายเดือนก่อน +1

      I use
      - rust-analyzer,
      - Even Better TOML
      - Mattrial Icon Theme
      - Toggle (to toggle the inlays and other things)
      - Toggle Quotes ;)
      - GitHub Copilot
      - Colonize (semicolon, I would love one that add "?" the same way, I might do it one day).

    • @JeremyChone
      @JeremyChone  11 หลายเดือนก่อน

      Btw, I finally took some time to make the Rust10x VSCode Extension.
      Here is the page about the Rust10x VSCode Extension and my VSCode setup:
      rust10x.com/vscode

  • @gertrudessampaio8689
    @gertrudessampaio8689 11 หลายเดือนก่อน +1

    Thank you Jeremy, it's great!! Can you share with us the vscode extension that you use for code snippet ?

    • @JeremyChone
      @JeremyChone  11 หลายเดือนก่อน

      I finally took some time to create the Rust10x VSCode Extension and a webpage with information about my VSCode setup.
      Everything can be found here: rust10x.com/vscode

  • @haoy80
    @haoy80 11 หลายเดือนก่อน +1

    That's awesome! Quick question: why not integrate an 'oac' wrapper in the 'asst' file? I'm moving away from the 'instance for everything' approach and would love to hear your thoughts :)

    • @JeremyChone
      @JeremyChone  11 หลายเดือนก่อน +1

      Yes, this aligns with the shift away from an instance-for-everything model.
      The assistant is a data object and should not be aware of who creates it.
      This falls under the assistant CRUD/controller, which are just functions.
      This approach ensures that there's only one state that matters, namely the AI client, i.e., OAC.
      It's similar to the controller/manager pattern used in the rust-web-app.
      This results in fewer states.
      It's important not to embed application states like clients or connections in our data object, in this case, the Asst. Otherwise, things become overly entangled, and eventually, complications will arise.

    • @haoy80
      @haoy80 11 หลายเดือนก่อน

      ⁠@@JeremyChone What is really a data object? Does it similar to "value object" in DDD? value without identity? In the previous "Tauri app" example we created a Store to normalize the surrealdb CURD methods. is that also a data object?

    • @JeremyChone
      @JeremyChone  10 หลายเดือนก่อน +1

      (Not sure about the DDD nomenclature.)
      In the Rust10x blueprint, we make the following distinctions:
      - Data Objects - are "objects" that solely contain data properties and no other states that need to be shared for a request or application. Examples include entities like Task, Project, Comment, and similar types. These are typically objects that represent a record of some sort, like a DB Row, Cloud Bucket Object information, etc.
      - Command State Objects - are "objects" that exist for the duration of a "job command" such as an HTTP Request or Tauri Command. In Rust10x, an example would be `Ctx`, which is the protocol/framework independent "command context."
      - Application State Objects - are usually found in `AppState` in frameworks like Axum, Tauri, and typically persist for most of the application's lifetime. In the Rust10x Web-App, examples include ModelManager or the RpcRouter.
      Rust10x's strategy is to keep the `Data Object` as simple and "dumb" as possible, which significantly simplifies the overall system as it grows.

  • @kashnigahbaruda
    @kashnigahbaruda 11 หลายเดือนก่อน +1

    The GOAT

  • @mariozulmin
    @mariozulmin 11 หลายเดือนก่อน +1

    Great video and great tool!! Learned a lot again! I really do like this approach of using buddy, is there a easy way to make it portable? I mean it is interesting to bundle the src files and upload them for buddy to look through . An amazing way would be to copy the binary to an existing src directory and have buddy using it so we could use it on different projects like i would love to? I haven’t had time to dig into it maybe it already works tho. Anyways i would love to hear your opinion on it and again thanks for the great work to the Community ❤

    • @mariozulmin
      @mariozulmin 11 หลายเดือนก่อน +1

      okay i have tried it, it does work pretty good when copy the binary and the buddy folder!

    • @JeremyChone
      @JeremyChone  11 หลายเดือนก่อน

      One option is to run `cargo install --path .`, which will install the binary locally. Then, you can call it from any terminal, driven by the buddy/buddy.toml configuration.
      Also, I've just made a significant update for the multi-crate. The commands are now:
      ```sh
      # Build everything
      cargo build
      # Run the command line
      cargo run -p ai-buddy-cli
      # Install the `buddy` command line locally
      cargo install --path crates/ai-buddy-cli
      ```
      One day TH-cam will support mardown!

    • @JeremyChone
      @JeremyChone  11 หลายเดือนก่อน

      Btw, I pushed to crates.io, so `cargo install ai-buddy-cli` should install the `buddy` command line.

  • @Xeros08
    @Xeros08 10 หลายเดือนก่อน

    27:45 how did you do to hide the type labels that rust_analyzer puts in the code? (The gray boxes that are purelly visual)

    • @JeremyChone
      @JeremyChone  10 หลายเดือนก่อน

      look at this page, the toogle inlays section (no need to install the Rust10x extension for that).
      rust10x.com/vscode#keybinding-for-toggling-the-inlays

    • @Xeros08
      @Xeros08 10 หลายเดือนก่อน +1

      @@JeremyChone WOW! That was a fast reply!
      Thanks ^^

  • @amblessedcoding
    @amblessedcoding 11 หลายเดือนก่อน

    Cool
    Please can you tell me the theme you are using in vscode

    • @JeremyChone
      @JeremyChone  11 หลายเดือนก่อน

      DarkModern with the google material icons.

    • @JeremyChone
      @JeremyChone  11 หลายเดือนก่อน

      Btw, I finally took some time to create the Rust10x VSCode Extension and a webpage with information about my VSCode setup.
      Everything can be found here: rust10x.com/vscode

  • @feifeilooper8312
    @feifeilooper8312 11 หลายเดือนก่อน +1

    cool thanks❤