OpenAI Structured Output - All You Need to Know

Поділитися
Вставка
  • Опубліковано 4 лют 2025

КОМЕНТАРІ • 66

  • @JimMendenhall
    @JimMendenhall 6 місяців тому +37

    Dude, thanks for being about the only person on youtube that goes beyond reading the press release!

    • @aiamfree
      @aiamfree 5 місяців тому

      yea cause they’re mostly just reporters. A couple of devs but if you know who I’m talking about they’re just there for the hype and dgaf

  • @hatemjaber
    @hatemjaber 6 місяців тому +6

    I love the full transparency and honesty, one of my favorite AI channels!

  • @IsaacMeisner-l2x
    @IsaacMeisner-l2x 6 місяців тому +1

    Was excited to see the blog post, even more excited to see Dave uploaded a video about it!!

  • @maciej.wolosewicz
    @maciej.wolosewicz 5 місяців тому +3

    Hi Dave! Thanks for next wonderful material. I really appreciate your work and a way you are explaining things. The best in class IMO. The small technical note - I noticed that there are some noticeable mouth clicks and harsh high-frequency sounds in the recording. It would improve the overall audio quality if you could address these issues. Keep up the wonderful job!

    • @daveebbelaar
      @daveebbelaar  5 місяців тому

      Thanks and I will definitely look into this!

  • @therealjohnshelburne
    @therealjohnshelburne 5 місяців тому

    Dude THANK YOU for the detailed explanation. I had no idea about pydantic

  • @xugefu
    @xugefu 5 місяців тому

    Thanks!

  • @VivekHaldar
    @VivekHaldar 6 місяців тому

    Great coverage and examples. Appreciated the comparison with Instructor. Thanks!

  • @bigdlamz
    @bigdlamz 5 місяців тому

    Excellent video, I hope your channel grows to millions of subscribers!

  • @maxedvideo
    @maxedvideo 5 місяців тому

    Wonderful explanation, straight to the point, thank you!
    Subscribed ✅

  • @LanguageEnabler
    @LanguageEnabler 2 місяці тому

    Very useful! Thank you for this video!

  • @MrMiguelaao
    @MrMiguelaao 5 місяців тому

    Thank you! Very clear and helpful.

  • @garymaya1767
    @garymaya1767 20 днів тому

    Love it, worked with Grok as well. cool!

  • @catalincrisan4840
    @catalincrisan4840 6 місяців тому

    Nice! Will give it a try, definitely. Thanks for sharing this.

  • @sumitbindra
    @sumitbindra 6 місяців тому

    Great job yet again! Would love a tutorial on using this new release for UI components.

  • @abhilasht8394
    @abhilasht8394 22 години тому

    Wow! thanks for sharing man.

  • @DavidDiazDev
    @DavidDiazDev 6 місяців тому

    Awesome video Dave, thanks a lot!

  • @viorelteodorescu
    @viorelteodorescu 5 місяців тому

    Great stuff, just what I needed to make my project err a bit less

  • @daffertube
    @daffertube 5 місяців тому

    I love this channel

  • @BrockMesarich
    @BrockMesarich 5 місяців тому

    Killing it Dave!

  • @chrismachabee3128
    @chrismachabee3128 5 місяців тому

    Excellent instructiion.

  • @artificialintelligencechannel
    @artificialintelligencechannel 5 місяців тому

    This great and very hands-on

  • @faustoalbers6314
    @faustoalbers6314 5 місяців тому

    Great content, I'm very curious to see how Instructor will utilize these updates

  • @WesleySilva-zr1yd
    @WesleySilva-zr1yd 5 місяців тому

    Super interesting. I'm captivated by structured output. It would be great if you had a comparison between methods/frameworks. It seems that Instructor is still the best.

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

    Simply the best!

  • @nabeelkhaan
    @nabeelkhaan 6 місяців тому

    Awesome Videos man

  • @Markyroson
    @Markyroson 4 місяці тому

    What IDE is it that you are using? That's cool that you can step through it like that.

  • @VanCliefMedia
    @VanCliefMedia 5 місяців тому

    I could be very wrong her but as for using less than or equal within a call and pedantic, wouldn't it work the same as in instructor if you just create a class for that and then use those named variables?, they have an example in the documentation like what I put below. Or am i reading into it wrong? is that a different use case from what you were saying at 20:40? Love the video thankyou !
    class Operator(str, Enum):
    eq = "="
    gt = ">"
    lt = "

  • @rudrasaha6816
    @rudrasaha6816 2 місяці тому

    Hi, thanks for the video. Can you kindly share some insights on, how I can use the gpt-4o-2024-08-06 model with the response_format command as the LLm in Autogen's assistant agent?

  • @HrishikeshSarma-k1c
    @HrishikeshSarma-k1c 5 місяців тому

    Full machine learning project please 🙏

  • @isfrank
    @isfrank 5 місяців тому

    Lekker bezig, Dave! Goeie video weer.
    Kleine vrijblijvende tip; Je woorden met TH klinken wat 'droog'. (wat bij veel nederlanders zo is.) Een oefening die daarbij goed werkt is om je tong net over je tanden heen uit te steken en terwijl je je randje van je tong tegen alleen je boventanden houd, spreek je op 0,5x speed "this" en "that" en "these" uit, waarbij je je tong tegen je boventanden probeert te houden voor de hele T-sound, de H volgt daardoor automatisch. Elke dag even oefenen & mensen kunnen straks misschien niet eens meer horen dat je nederlands bent!
    Niet dat mijn Engels perfect is, maar toch zeker minstens zo goed als het jouwe 🤩
    Niet dat ik hier kwam om je uitspraak te bashen 😂 maar deze tip heb ik zelf een keer gekregen en dat hielp mij

  • @brianmorin5547
    @brianmorin5547 5 місяців тому

    Can you help me understand when or why I would ever use function calling now?
    If I get all of the necessary arguments in a structured output, I can make my own conditional logic on what functions to call and which arguments to send

  • @ahmadzaimhilmi
    @ahmadzaimhilmi 5 місяців тому

    Haven't been able to make it work consistently using 4o-mini. Need to resubmit the response several times for it to work.

  • @PhotoshoppersStop
    @PhotoshoppersStop 5 місяців тому

    Hi Bro, love your videos, need your advice on how to add memory in sql_agent? conversationbuffermemory is not good enough, Using langgraph can we have a tutorial? Thanks

  • @acanizares_
    @acanizares_ 5 місяців тому

    Is possible to maintain the context with assistants and still using structured outputs Vía API?
    For several interactions with an assistant

  • @Vimalnarain
    @Vimalnarain 5 місяців тому

    Can we use these new updated with RUNS also where we are using multiple function calls?

  • @noahjaffe3094
    @noahjaffe3094 5 місяців тому

    Great video! I have a question about the API itself. I notice you are using the openAI client, rather than a python requests library call or the like. Is there a reason for this? I have seen some sources online recommend against using the client when possible because of dependency issues, but wondering where you stand on this. Thanks!

    • @daveebbelaar
      @daveebbelaar  5 місяців тому +1

      Thanks! Either way is fine. The Python OpenAI client does have dependencies, but so has the API interface that gets an update every now and then. Just track your OpenAI pip version in the requirements.txt.

  • @MrAhsan99
    @MrAhsan99 6 місяців тому +1

    This JSON scema thing is new to me? Did you write this manually?
    Isn't this difficult to learn?

    • @HerroEverynyan
      @HerroEverynyan 5 місяців тому +1

      You can generate that JSON schema using Pydantic. He talks about that at 16:00

    • @MrAhsan99
      @MrAhsan99 5 місяців тому

      @@HerroEverynyan Got it, Thanks

  • @CryptoMaN_Rahul
    @CryptoMaN_Rahul 6 місяців тому

    Sir I'm working on my final year project there are 2 main modules in it
    1) previous year paper detailed analysis system along with sample paper generation as per trends ,and study roadmap provider
    2) notes generation module from textbook content
    I'm confused what to use where .. whether fine tuned llm , or RAG or anything other ?
    Can you please explain, it is for engineering students (1st -4th semester, each one has 6 subjects ), there are 7 different branches.

  • @DangRenBo
    @DangRenBo 5 місяців тому

    Vercel has already updated their AI SDK to support this. Example:
    const { object } = await generateObject({
    model: openai('gpt-4o-2024-08-06', {
    structuredOutputs: true,
    }),
    schema: z.object({
    recipe: z.object({
    name: z.string(),
    ingredients: z.array(
    z.object({
    name: z.string(),
    amount: z.string(),
    }),
    ),
    steps: z.array(z.string()),
    }),
    }),
    prompt: 'Generate a lasagna recipe.',
    });

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

    How to use json schema with Openai Assistants? They don't seem to support it natively

  • @Divyv520
    @Divyv520 5 місяців тому

    Hey Dave, really nice video ! I was wondering if I could help you with more Quality Editing in your videos and also make a highly engaging Thumbnail and also help you with the overall youtube strategy and growth ! Pls let me know what do you think ?

  • @mrlions420
    @mrlions420 5 місяців тому

    Have you managed to get this working with batch processing?
    If you could make a video on structured outputs with batch processing I'd be eternally grateful

  • @catalincrisan4840
    @catalincrisan4840 5 місяців тому

    Hey Dave, was just trying it, but with Azure OpenAI... do you know if it works with AzureOpenAI or just with the direct client from OpenAI?

    • @daveebbelaar
      @daveebbelaar  5 місяців тому

      The new model and API will probably be available in the next days (this is usually what happens with new releases)

  • @GayathriG-h5h
    @GayathriG-h5h 5 місяців тому

    How to use those with LCEL

  • @DebiprasadGhosh
    @DebiprasadGhosh 6 місяців тому

    gr8!

  • @kanishkasah4383
    @kanishkasah4383 4 місяці тому

    Error occurred: 'ChatCompletion' object is not subscriptable

  • @edendjanashvili2963
    @edendjanashvili2963 6 місяців тому

    How can this be done with Langchain?

    • @catalincrisan4840
      @catalincrisan4840 5 місяців тому

      I think it can't yet. Have a feeling is working only by using Open AI API directly

  • @Solo2121
    @Solo2121 6 місяців тому

    I'm not showing the 04_structured_output.py in the repo just fyi.

    • @daveebbelaar
      @daveebbelaar  6 місяців тому

      Thanks for that! Something got stuck in git. Here's the link: github.com/daveebbelaar/openai-python-tutorial/blob/main/04%20Structured%20Output/04_structured_output.py

  • @SantiagoRobaina-xn1kk
    @SantiagoRobaina-xn1kk 5 місяців тому

    Hey! Has anyone came up with this error message?
    AttributeError: 'Beta' object has no attribute 'chat'
    I'm using python 3.12.3 and openai 1.40.5

  • @magicismagic123
    @magicismagic123 6 місяців тому +1

    Can someone explain to me like a kid. (honest qs)
    What's the purpose of openai structure output?

  • @haralc
    @haralc 5 місяців тому +3

    Is it just me or there's something in the audio that irritates my eardrums? 🤔

    • @Daytwoo
      @Daytwoo 4 місяці тому

      Ya he needs to eq and compress his audio channel - the high end is accentuating his s’s and high end noise

  • @viorelteodorescu
    @viorelteodorescu 5 місяців тому

    Great stuff, just what I needed to make my project err a bit less