OpenAI JSON Mode, Function Calling & Instructor Explained

Поділитися
Вставка
  • Опубліковано 4 лип 2024
  • Want to get started with freelancing? Let me help: www.datalumina.com/data-freel...
    Need help with a project? Work with me: www.datalumina.com/consulting
    🔗 GitHub Repository
    github.com/daveebbelaar/opena...
    🛠️ My Development Workflow
    • My Development Workflo...
    ⏱️ Timestamps
    00:00 Introduction
    01:29 OpenAI Default Response
    09:41 OpenAI JSON Mode
    14:56 OpenAI Function Calling
    23:53 Pydantic + Instructor
    35:25 Output Validation
    41:04 Content Filtering
    45:17 Use Case Example
    47:38 What is Data Freelancer?
    👋🏻 About Me
    Hi there! I'm Dave, an AI Engineer and the founder of Datalumina. On this channel, I share practical coding tutorials to help you become better at building intelligent systems. If you're interested in that, consider subscribing!
    #openai #pydantic #instructor #json
  • Наука та технологія

КОМЕНТАРІ • 36

  • @isaihernandez4136
    @isaihernandez4136 Місяць тому +7

    This is gold. Thanks for sharing Dave!

  • @mzafarr
    @mzafarr Місяць тому +4

    Please keep on making unique content like this that solves pains of gen AI developers for which solutions aren't that straightforward.

  • @AliAbassi1
    @AliAbassi1 29 днів тому

    The exact video i needed with Pydantic and Instructor - Thank you Dave!

  • @pedroaquino3042
    @pedroaquino3042 7 днів тому

    Really helpful video Dave, thank you for sharing this information!

  • @farhanafridi8694
    @farhanafridi8694 Місяць тому +2

    Wow! Knowledge bomb.
    Please make more videos like this.

  • @maqboolurrahimkhan
    @maqboolurrahimkhan Місяць тому

    Thanks Dave, love ur content and channel

  • @dvx24
    @dvx24 Місяць тому

    Insane content. Thank you.

  • @user-vm7xx3wi8cbz
    @user-vm7xx3wi8cbz Місяць тому

    Dave.. your content is so specific for us GenAI devs. I LOVE it. Please keep it up!

    • @daveebbelaar
      @daveebbelaar  Місяць тому +1

      More to come!

    • @user-vm7xx3wi8cbz
      @user-vm7xx3wi8cbz Місяць тому

      @@daveebbelaar I have a follow up question. If you want to "prompt" the LLM to output AI generated emails in a specific format (e.g. intro paragraph/hook of 30 words max, main body of e.g. 50 words max and a CTA of 15 words max) what would be your suggested approach? The traditional way of just giving an example when prompting is very unreliable in this regard but wondering which of your discussed approaches would be best.

  • @micbab-vg2mu
    @micbab-vg2mu Місяць тому

    Great content - thank you for sharing:)

  • @AndrewChildsza
    @AndrewChildsza Місяць тому

    This was great, thanks. I've had questions about this previously

    • @daveebbelaar
      @daveebbelaar  Місяць тому

      Thanks! The different methods can definitely be confusing at first.

    • @AndrewChildsza
      @AndrewChildsza Місяць тому

      ​@@daveebbelaar They certainly can!
      I was wondering, do you know of a way to make a RAG using something like Flowise AI work with tools? Eg, have a RAG chatbot that is able to call on functions (POST to a webhook), for example when it sees fit to? I have attempted to configure this in Flowise, but always get stuck at merging the RAG and the tool together...
      I suspect something like the solutions you cover in this video could work for that sort of requirement... 🙏

  • @johannesseikowsky8197
    @johannesseikowsky8197 Місяць тому

    man, you're a really good teacher!

  • @slcpunk_
    @slcpunk_ Місяць тому

    Very helpful!

  • @mzafarr
    @mzafarr Місяць тому +1

    THANK YOU!

  • @varung4223
    @varung4223 Місяць тому

    This content is awesome !!!!!

  • @SriniVasan-hv8cq
    @SriniVasan-hv8cq 3 дні тому

    Absolutely fantastic! Thanks for sharing @daveebballar! Can we make this work with a local llm - e.g. ollama?

  • @bulutosman
    @bulutosman Місяць тому

    You are great Dave, helping us a lot. Thank you for your effort here.
    Does Instructor library also work with Assistant API of Open AI instead of Chat completion API? I mean instead of client.chat.completions.create, using client.beta.threads.runs.create format. Does this work with Instructor as well? One another question is, are you really using Chat Completion API for your project with your real world client that you mention in the video? If so, why don't you use assistant API? Is not that easier? Is there any drawbacks of Asisstant API over Chat Completion API?

    • @AlwynCornforth
      @AlwynCornforth Місяць тому

      yea i would like to know as well since we using threads and runs this solution does not work unless you build around chat completions

  • @Vimalnarain
    @Vimalnarain Місяць тому

    can we use it with runs as well

  • @mzafarr
    @mzafarr Місяць тому

    Won't it be same if I simply pass schema inside the system message rather than using instructorGPT/function calling thing?

  • @GarthVanSchalkwyk
    @GarthVanSchalkwyk 11 днів тому

    Hi Dave does your company also make apps for math education. Where can we find details of your company

  • @bs_general
    @bs_general Місяць тому

    @daveebbelaar, if I'm not mistaken, I think "max_retries=1" means retries are allowed once. If you don't want to allow any retries, it needs to be "max_retries=0", correct?

    • @daveebbelaar
      @daveebbelaar  Місяць тому

      Hmm, while that would make sense, I am not sure. I tried many examples with max_retries=1, and they all failed. I can't see anything in the docs about this. It would require further testing and looking at the API calls.

  • @alichch1241
    @alichch1241 Місяць тому

    Hey there new to channel and pretty new to AI still in learning process :) tbh I think this video is soo advanced for me to grasp the idea :) but I have some insights on it can you correct me if Iam wrong :)
    My insight: "You are building a software for responses depending on pretrained LLM models " ?

    • @danielogunlolu
      @danielogunlolu 9 днів тому

      yea. He is basically building a wrapper around chat-gpt that does really specific task with more accuracy an efficiency .

  • @ce7882
    @ce7882 Місяць тому

    Is there an example of the content filtering for JavaScript? I can see instructor has a JavaScript version but can’t see any information or examples on content filtering. Would appreciate any help!

  • @bs_general
    @bs_general Місяць тому

    Hi, thanks for this tutorial. But the Git repo is not available. It shows 404 error. Thanks

    • @daveebbelaar
      @daveebbelaar  Місяць тому

      Ah, it was still set to private. It's fixed now - thanks!

    • @bs_general
      @bs_general Місяць тому

      @@daveebbelaar Yeah, its working now. Thanks 👍

    • @mulderbm
      @mulderbm Місяць тому +1

      Great Stuff there. Really like the use case as it is not new, message classification, but how to do this with an LLM instead of a local ML model and do it reliably!