Create a Custom AI Assistant + API in 10 Mins

Поделиться
HTML-код
  • Опубликовано: 6 июн 2024
  • Learn how to build your own AI assistant using OpenAI's Assistants API and how to access it via Python.
    👉 Links
    🔗 Code: github.com/pixegami/openai-as...
    🔗 Documentation: platform.openai.com/docs/assi...
    🔗 OpenAI Assistants: platform.openai.com/assistants
    🔗 Data (PDF): www.eiu.com/n/campaigns/globa...
    📚 Chapters
    00:00 OpenAI Assistants API
    00:58 Create an OpenAI Assistant
    02:07 Adding Custom Data
    04:03 Function Calling
    05:58 Code Interpreter
    06:57 Using an API Endpoint
    10:03 Wrapping Up
    #pixegami #ai

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

  • @jkbullitt8986
    @jkbullitt8986 5 месяцев назад +4

    Excellent Bro!!! Clear and concise👍

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

      Thank you :) Hope you enjoyed it.

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

    To the point, good quality. Subscribed.

  • @RatherBeCancelledThanHandled
    @RatherBeCancelledThanHandled 5 месяцев назад +1

    Love your videos. Thanks for sharing 👍

    • @pixegami
      @pixegami  5 месяцев назад +1

      Thank you, glad you enjoyed it!

  • @lukekoletsios3236
    @lukekoletsios3236 3 месяца назад +2

    Thanks for the video man. This helped me understand how I can transfer my custom-built OpenAI chatbot to my website/SaaS. Basically it's an interrelationship with VSCode and OpenAI and then once I'm happy I just use the API and chabot ID and somehow plug it into my website on the backend. At least that's what I think. We'll see.

    • @pixegami
      @pixegami  3 месяца назад +1

      Glad to hear it helped you get going. There's a lot of different ways to build what you want, so the best thing is just to go ahead and try it out like you are doing. Good luck!

  • @nathanielvolk515
    @nathanielvolk515 5 месяцев назад +1

    Another awesome video! Thanks!

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

      Glad you enjoyed it! Thank you :)

  • @nirubansatchithanandakumar3266
    @nirubansatchithanandakumar3266 18 дней назад +1

    so concise and clear! thank you!

    • @pixegami
      @pixegami  15 дней назад

      Glad to hear it was useful!

  • @be_present_now
    @be_present_now 4 месяца назад +1

    Good tutorial! Thanks! 👍

  • @brianhopson2072
    @brianhopson2072 26 дней назад +2

    I see how much I have been over complicating this. Thanks.!

    • @pixegami
      @pixegami  26 дней назад

      Glad it helped!

  • @federicosrossi
    @federicosrossi Месяц назад +1

    great work man! thanks for sharing

    • @pixegami
      @pixegami  Месяц назад +1

      You're welcome! Glad you liked it!

  • @P051D0N
    @P051D0N Месяц назад

    Wow you are amazing. Everything is well explained and completed. I am so impressed.

    • @pixegami
      @pixegami  Месяц назад

      Thank you so much! I really appreciate the feedback :)

  • @sss28765431
    @sss28765431 3 месяца назад +1

    Great video. I will try it a little bit.

    • @pixegami
      @pixegami  3 месяца назад

      Thank you. Good luck!

  • @edwardwong654
    @edwardwong654 4 месяца назад +13

    Dude you are much better looking than Sam. Use your own pic and be proud :-)

    • @pixegami
      @pixegami  3 месяца назад +2

      I'm flattered. Thank you!

  • @AkulSamartha
    @AkulSamartha 3 месяца назад +1

    Such a simple and easy eplaination. I wish you were my college professor.

    • @pixegami
      @pixegami  3 месяца назад

      Thank you :)

  • @sergeipetrochemie9894
    @sergeipetrochemie9894 3 месяца назад +1

    Very good video. Thank you 👌

    • @pixegami
      @pixegami  3 месяца назад

      Glad you liked it!

  • @hanankhader3410
    @hanankhader3410 2 месяца назад +1

    thanks a lot it's really helpful, can you make part 2 for build a custom UI using streamlit with AI Assistant

  • @thebreak247
    @thebreak247 4 месяца назад +1

    Awesome thank you! @pixegami Do you know how to print screen what tool the assistant is using while answering your query? Assuming there are multiple tools available to the assistant. Thanks.

    • @pixegami
      @pixegami  4 месяца назад +1

      Hmm, I think maybe if you enable the verbose setting in the assistant, you might be able to get more details out of it? Not quite sure, but I think it'll probably be somewhere in the OpenAI docs. I'd be shocked if they didn't expose that feature :P

  • @dmbrv
    @dmbrv 5 месяцев назад +1

    great video

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

      Thank you :)

  • @jeffb6305
    @jeffb6305 5 месяцев назад +2

    Great video! What steps would need to be included to allow the Assistant to use data from a 3rd party API? I’m not a coder and hope there is a way to connect to an external API from the Playground using Functions tool?

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

      That's probably a bit more complex, I think currently you do need a bit of coding to get that working.
      So the OpenAI assistant will just give you the raw data to send to the 3rd party API. You'll have to write (or generate) some code to use that input and make the call yourself, then you can decide what to do with the response (e.g. feed it back to the assistant, or do something else with it).

  • @sehse100
    @sehse100 День назад

    Perfect

  • @gctsquaternion6510
    @gctsquaternion6510 4 месяца назад +1

    Nice video!!!!!

  • @IdPreferNot1
    @IdPreferNot1 4 месяца назад +1

    Any suggestions on fast cheats for creating these JSON or Yaml schemas? Something in VS code, feeding question into GPT? Havent been able to get them to automatedly generate these template styles

    • @pixegami
      @pixegami  3 месяца назад +1

      Hmm, for something like this, I think since it's usually a "one-off" cost to developing an assistant, it's probably best to do the schemas by hand so you can validate them and make sure they are to your spec. You'll always get variable results with LLMs to help on schemas like this that are not widely used or documented in its training data.

  • @AlfieMarsh
    @AlfieMarsh Месяц назад +1

    Hey - what do you use to edit the gradient circle around your camera?

    • @pixegami
      @pixegami  Месяц назад

      I just prepare the graphic in photoshop (it's just a gradient circle), then use OBS to record. I put a circular mask around my camera image, and just stick that on top of the circle.

  • @omaryamani5799
    @omaryamani5799 2 месяца назад +1

    great video,i ve been struggling with the API connexion with my assistant,do you have an equivalent code for R?

    • @pixegami
      @pixegami  Месяц назад

      Ah, sorry I don't have a ton of experience with R. :(

  • @appcrazee
    @appcrazee 2 месяца назад +1

    Can you force it only to look into your data for its responses? Very nice video. Thank you.

    • @pixegami
      @pixegami  2 месяца назад

      I'm not sure how possible that is from the Assistant tooling itself. But (either using this or using the something like Langchain and RAG directly) you could also implement your own validation that the data it uses must closely relate to the material you've given it.

  • @vrlchebolu
    @vrlchebolu 3 месяца назад +1

    Great video. I'm still new. How is this different from asking chat GPT to summarize a document for me?

    • @pixegami
      @pixegami  3 месяца назад

      It lets you configure the GPT with a bit more context upfront, so if you wanted to build an app or a UI on top of this for other people to use, this gives you a head start.

  • @KumR
    @KumR 4 месяца назад +1

    so this is basically doing a task which langchain or llamaindex is doing?

    • @pixegami
      @pixegami  3 месяца назад

      Sort of. The UI/UX is a little easier and more managed. But you can definitely also implement something like this yourself with Langchain.

  • @fintech1378
    @fintech1378 2 месяца назад +1

    sorry im new to OAI assistant API..i have already had 'credentials' from my custom GPT in GPT store. how can i connect it to my separate app with assistant API? not recreating the instruction on assistant API but just connect it to custom GPT in GPT store that i have already created earlier

    • @pixegami
      @pixegami  2 месяца назад +1

      I think the Custom GPT and the Assistant APIs are slightly different products in OpenAI's backend, so you'll probably have to re-implement your Custom GPT as an Assistant first, then use that as an API in your app.

  • @aidanlimon2756
    @aidanlimon2756 25 дней назад

    Does the ai assistant have the ability to retain memory?

  • @user-rw8fi4di5x
    @user-rw8fi4di5x 10 дней назад

    There is no Retrieval in the tools on my screen. Can you guess what the problem is?

  • @shukrantpatil
    @shukrantpatil 3 месяца назад +1

    But the GPT's in the gpt store are capable of accessing external API's, why aren't the assistant capable of doing so ? Do you know any alternate models which allow for external API access ?

    • @pixegami
      @pixegami  3 месяца назад

      I'm not sure why they allowed the GPT store to do that (do they really!?), but not custom assistants. But I guess that's something OpenAI expects you to handle in your own server side logic.

  • @edwardwong654
    @edwardwong654 3 месяца назад +3

    ImportError: cannot import name 'OpenAI' from 'openai'
    This is a library compatibility problem. Any fix? ChatGPT has me running in circles literally with the same 2 set of fixes. Thanks. Still a good video!

    • @edwardwong654
      @edwardwong654 3 месяца назад +2

      The problem was cause by VS Code IDE. When I created a new venv, ran the main.py as a script, it was fine. So I need to either new a new IDE, or find the config issue in my VSC. Thanks.

    • @pixegami
      @pixegami  3 месяца назад +1

      It's probably that you need to select the Python environment to use. By default, I think VSCode might not know which Python environment you need to use. Don't worry, it's quite a common snag that I get caught on a lot as well.
      Here's how to fix it: code.visualstudio.com/docs/python/environments

  • @ugurcancamm
    @ugurcancamm 3 месяца назад +1

    Is there any way to personalize assistant on mobile app?

    • @pixegami
      @pixegami  3 месяца назад

      I guess you can write a mobile app as a frontend to interact with your own AI assistant API?

  • @thijz0
    @thijz0 4 месяца назад +1

    im unable to save documents for reference.. any idea?

    • @pixegami
      @pixegami  3 месяца назад +1

      Hmm, did you check if the file format of the doc (e.g. PDF, text, etc) and the file size is supported by OpenAI?

  • @willyu7515
    @willyu7515 3 месяца назад +1

    May I ask wht I only have GOT3.5 turbo, no Gpt 4. I also paid.

    • @pixegami
      @pixegami  3 месяца назад +1

      Hmm, do you have the premium membership subscription? That's all I have and it shows up for me. I don't know if there's any geographical restrictions... (I'm in Australia).

    • @TheEagle-re9dp
      @TheEagle-re9dp 2 месяца назад

      Hey @willyu7515, all you need to do is add some credits to your account (minimum $5). It's terrible that they don't mention it, but I had the same problem, and as soon as I added some money, the GPT 4 popped up. Hope it helps!

  • @Aaron7k
    @Aaron7k 4 месяца назад +1

    CAn I ajust Tokens and temperature?

    • @pixegami
      @pixegami  3 месяца назад

      Hmm, I don't think the Assistants API allows you to do that. If you want a finer level of control, it might be best to implement your own agent using the model directly and something like Langchain library for utility.

  • @matlarasta
    @matlarasta 2 месяца назад +2

    but assistant api still not have history right ?

    • @pixegami
      @pixegami  Месяц назад

      I think with "threads" you can have history for that thread. You'll just have to store the thread ID to retrieve it?

  • @superfliping
    @superfliping Месяц назад +1

    Would you like to be a Judge?
    1. CodeCraft Duel: Super Agent Showdown
    2. Pixel Pioneers: Super Agent AI Clash
    3. Digital Duel: LLM Super Agents Battle
    4. Byte Battle Royale: Dueling LLM Agents
    5. AI Code Clash: Super Agent Showdown
    6. CodeCraft Combat: Super Agent Edition
    7. Digital Duel: Super Agent AI Battle
    8. Pixel Pioneers: LLM Super Agent Showdown
    9. Byte Battle Royale: Super Agent AI Combat
    10. AI Code Clash: Dueling Super Agents Edition

  • @chanel454879876354
    @chanel454879876354 2 месяца назад +1

    As far as I understand, it is impossible to call external API directly from the chat GPT agent. It is only possible to call an assistant from the Python code locally on a PC.

    • @pixegami
      @pixegami  2 месяца назад +1

      Yup, that's my understanding as well.

  • @feliperivadeneira6488
    @feliperivadeneira6488 4 месяца назад +1

    doesn't it works with excel files?

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

      I'm not sure, I think it does? But if not, you can probably export the Excel file into a CSV (which I'm pretty sure it should work with).

  • @renealbrechtsen9743
    @renealbrechtsen9743 5 месяцев назад +1

    Can you do a django tutorial ?

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

      Thanks :) Django is requested quite a lot so I've scheduled in to work on a tutorial in the next 3 months or so :)

  • @bryanace147
    @bryanace147 13 дней назад

    2:10

  • @atitbimali9224
    @atitbimali9224 5 месяцев назад +1

    Unfortunately it's not free, it reponds with quota exceeded.

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

      Yup, I think it might require an OpenAI account. Have you tried changing it to a different (older) model?

  • @bobbastian760
    @bobbastian760 2 месяца назад +1

    The way they constructed this API, with runs and threads and messages - it's hilariously unintuitive and bad. Almost as bad as a Google API - I mean not that bad but still.
    It's like they purposely decided to make it incomprehensible.

    • @pixegami
      @pixegami  2 месяца назад

      I agree it was incredibly unintuitive to use. But designing APIs like this will always have a lot of trade-offs, and I think the designers here were really positioning it for high-scaling, async-first use cases.

  • @bobbastian760
    @bobbastian760 2 месяца назад +1

    *most livable *most boring :D

    • @pixegami
      @pixegami  2 месяца назад

      Well... 🤷‍♂️

  • @Zinab8850
    @Zinab8850 3 месяца назад +1

    Thank you for this great tutorial🤍
    why it doesn't show me chatGPT4 and only chatGPT3.5? and can i upload images to the assistant?

    • @shukrantpatil
      @shukrantpatil 3 месяца назад +1

      you need to get the premium subscription for chatgpt-4 and i think it does accept images

    • @pixegami
      @pixegami  3 месяца назад

      Yup, it seems as someone else mentioned, you might need to have the OpenAI premium subscription to access GPT-4.