OpenAI Assistant API, getting started

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

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

  • @p.c.336
    @p.c.336 9 месяцев назад +2

    Great video, I appreciate your effort. I'm also impressed by how you take the time to respond to comments. You truly have a kind heart 🙏

    • @StephenBlum
      @StephenBlum  9 месяцев назад

      Absolutely happy to do it! 😄 Looking forward to more 🙌

  • @IppolitoEDU
    @IppolitoEDU 7 месяцев назад +1

    Great video, thanks. I am not a developer (STEM educator). I want to build an assistant like you did here, but connect it to other platforms for input/output (like D-ID). Do you have any videos about that? Thanks!

    • @StephenBlum
      @StephenBlum  7 месяцев назад +1

      Nice! Your idea is fantastic. That sounds like a great way to add knowledge and have a digital avatar speak it aloud. D-ID can be enhanced with your own custom data. This sounds really neat! I'll look into this to see what it would take. I think we'd need to build something to make it work. We need to leverage the function calling capability of ChatGPT to invoke the AI to provide knowledge from your PDF files and then invoke the D-ID avatar to speak the response. I've added this to my list of video idea planning. Thank you!

    • @IppolitoEDU
      @IppolitoEDU 7 месяцев назад +1

      @@StephenBlum Thank you so much for your thoughtful and thorough response. I sincerely appreciate it!

  • @multishorts-bu5dg
    @multishorts-bu5dg 9 месяцев назад +2

    Hello, great video, but, I'm yet to understand, do i get a personal api for my assistant that i can link to my application?

    • @StephenBlum
      @StephenBlum  9 месяцев назад +1

      Yes you do. You can make API calls directly to your custom assistant. It's referenced by Assistant ID and Thread ID. Both Assistant and Thread are independent. You've already created the Assistant in the GUI. Next you'll create a Thread ( series of chat messages ) and then issue a "create Run" using both Assistant and Thread IDs. platform.openai.com/docs/assistants/overview

  • @Pure_Science_and_Technology
    @Pure_Science_and_Technology Год назад +2

    CAUTION! FYI there is a failure of direct retrieval with GPT-4 using the new OpenAI Assistant API. GPT tokenizes text and creates its own vector embeddings based on its specific training data. The new terms and sequences may not connect well to the pretrained knowledge in GPT's weight tensors.
    There was no semantic similarity between the new API terms and GPT's existing vector space. This is a fundamental issue with retrieval augmentation systems like Rag - external knowledge is not truly integrated into the model's learned weights. Adding more vector stores cannot solve this core problem.
    The solution is to have multiple learned "knowledge planes" with trained weight tensors for specific tasks that can be switched in. This is better than just retrieving separate vector representations.

    • @StephenBlum
      @StephenBlum  Год назад

      @Canna_Science_and_Technology Yes this is a good point! You make an important note about the limitations of OpenAI's RAG approach. They take your text document, vercotrize into tokens using their token lookup. They may be splitting your documents into segments, and creating snippets before creating an embedding that can be indexed for similarity search. This will be used to compare with the user-input prompt. Any vector similarities will be included as reference text along with the user-input prompt. While this provides general level of context for the GPT model, it won't have a deep knowledgeable understanding of your custom document data.

  • @antdx316
    @antdx316 8 месяцев назад +1

    I’ve been using the PC since Windows 95 and just realized you should Print Sites as a PDF then upload it into AI. 👍

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

      Absolutely! 😊 This is a good way to provide context for your Assistant API. The PDF format is uniform and easy to capture the important text data without the formatting form the HTML and CSS.

  • @DWSP101
    @DWSP101 11 месяцев назад +1

    OK I’m looking to create an AI assistant using this exact method for at least the first few minutes and I’m just using a Apple tablet directly through a browser to do this. Where do I start?

    • @StephenBlum
      @StephenBlum  11 месяцев назад

      Using your Apple tablet in Safari, you'll want to create a new "Assistant". platform.openai.com/assistants there is a button [+ Create]. Click the button and fill in the form. This will create the default Assistant. You can start customizing from here! 😄

  • @mr.tycoon7246
    @mr.tycoon7246 Год назад +1

    I can create 10 assistants based on consciousness and thoughts and some of them on interpretation and retrieval then use a/a lot of python scripts to get an autonomous AI, this is nice, If I mix this with Lang chain it will be OP

    • @StephenBlum
      @StephenBlum  Год назад

      This is a great idea!! You'll basically be creating a workflow of human logic. You can create a system that would closely resemble human thought. Nice! 😄🚀

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

    trying to figure out how to use those assistants in php instead of python. cant find tutorials, any help?

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

      Yes here is how to do that in PHP: community.openai.com/t/looking-for-a-simple-procedural-php-function-for-openai-use/215914/3 Also, the AI itself will write the code with the prompt: "Write me a PHP Curl example using the OpenAI API Assistant API.

  • @felixseitz3411
    @felixseitz3411 Год назад +1

    I want to build something with the Assistants API for my website. Is there also a word limitation for it like in GPT-4? When Im using GPT-4 in the chatbot, i need to write „continue“ after roughly 1200 words. What I need for my website is, that it generates 3000 words in one response (needs to be an analysis of something). Is this possible with the assistants api? If the answer is no, is there any workarounds?

    • @StephenBlum
      @StephenBlum  Год назад

      @felixseitz3411 hi! good question. Is there a word limit: Yes The new API word limit is 4095 tokens. This is close to 3,000 words in one response.

  • @utk1000
    @utk1000 Год назад +1

    where is the file link that u uploaded to the assistant for file retreival? how can i make or find such files for developing various other assistants

    • @StephenBlum
      @StephenBlum  Год назад

      That's the great part about the assistant API, it lets you upload PDFs and other text-based documents directly. Simply add a file using the UI. When you list the assistants, The upload form should be available near the bottom when editing and assistant.

    • @utk1000
      @utk1000 Год назад +1

      @@StephenBlum I mean where do I get the file itself

    • @StephenBlum
      @StephenBlum  Год назад

      Around 2:10 the example PDF file is uploaded on the video

    • @utk1000
      @utk1000 Год назад +1

      @@StephenBlum thanks a lot man 🤝. I'm a beginner in AI, appreciate the help.

    • @StephenBlum
      @StephenBlum  Год назад +3

      @@utk1000 any text-based file works. The AI will gain the knowledge that you give it and prioritize that knowledge above its existing knowledge. In the video we upload a PDF, which is a text file. We got the PDF from a web page. We printed as PDF. And saved the file to our computer. Then we uploaded the file to the assistant API

  • @ricardotaipe
    @ricardotaipe Год назад +1

    So does the assistant API let you "bring" ChatGPT (or more specifically CustomGPTs) to "other places" (via the API)?
    I was having a bit of trouble understanding what assistant API is hehe

    • @StephenBlum
      @StephenBlum  Год назад

      @ricardotaipe good question, The Assistant API is the most advanced and customizable framework that OpenAI is currently offering. The Assistant API allows you to define a custom GPT based on the rules you provide it. You can add custom knowledge in large quantities, add custom rules to follow, and also provide access to custom code and data fetch capabilities. This means you can create completely integrated assistants like a "calendar assistant" that can fully manage your calendar the way a human assistant would. You can create a "booking" Assistant API service that fully automates a doctors office customer schedule. Using natural language, customers can verbally speak to OpenAI's Whisper API, and the Assistant API can determine actions using custom-defined functions like "calendar slot available" and "schedule appointments at specific times."

  • @shivamkumar-qp1jm
    @shivamkumar-qp1jm Год назад +1

    Is it free to use I have a GPT Plus Subscription

    • @Jakyblacky
      @Jakyblacky Год назад +2

      I think is free for now, until November 17th

    • @StephenBlum
      @StephenBlum  Год назад

      Nice! Happy to see it's free. I was using it a lot, and expecting a charge. This is great news 🎉

    • @elrecreoadan878
      @elrecreoadan878 Год назад +1

      Hi! What differences is there between GPTs and Assistants ?

    • @StephenBlum
      @StephenBlum  Год назад

      @@elrecreoadan878 GPTs vs Assistants are the same system. There is a difference. The advanced features are only available in the Assistants API. While GPTs lets you prepare a specialized GPT, the Assistants API allows you to integration into any system programatically. Building via GPTs states you don't need to know any code to build. So it will be limited in capability, at least initially.

  • @jameylynch2709
    @jameylynch2709 Год назад +1

    Let’s build an agent together!

    • @StephenBlum
      @StephenBlum  Год назад

      Totally! There's huge potential here. The ability to leverage custom functions to pull data from external systems. An Assistant can generate reports from your database, it'll know your schema and how to aggregate data. Next-gen data research

  • @tbcdemos6297
    @tbcdemos6297 Год назад +1

    cant help but notice you sound like Sheldon from Big bang theory, an influence for you or both of you belong to perticular place with this accent/tone ..? just curious and completely non-techincal .. thanks

    • @StephenBlum
      @StephenBlum  Год назад

      Haha thank you, that is coincidental 😄♥️ I've heard this comment before, some years ago

  • @becchitequesta
    @becchitequesta Год назад +1

    hi, how can i export my gpt? i can only run it on test playground. Thanks a lot!

    • @StephenBlum
      @StephenBlum  Год назад

      Using the API platform.openai.com/docs/api-reference/runs/createThreadAndRun the quick and easy option is to use the createThreadAndRun approach. This approach allows you to submit the prompt to your pre-created Assistant referenced by the `assistant_id`. createThreadAndRun will return a thread_id which you use to check the "status" of the run. You can poll for "complete" status platform.openai.com/docs/api-reference/runs/getRun every few seconds. Finally you'll fetch the messages for the thread which is the output platform.openai.com/docs/api-reference/messages/listMessages - it's a three step process 😄 at least, that is the fewest steps currently possible I could find

  • @youriwatson
    @youriwatson Год назад +2

    really cool!

    • @StephenBlum
      @StephenBlum  Год назад

      Thank you! It's really powerful. I also heard about AWS quietly launched their own version: aws.amazon.com/bedrock/agents/ - which is key if your corporation requires data firewalls. Though OpenAI Assistant API looks much simpler to use, at least there is still an option for use cases requiring data remain on AWS.

  • @MannyBernabe
    @MannyBernabe Год назад +1

    Thanks!

    • @StephenBlum
      @StephenBlum  Год назад +1

      Happy to help! This is a quick start guide. The video covers simple document retrieval. Now you can inform a GPT with your proprietary data and create powerful applications. You can also create an internal business tool that knows specific details from your company wiki and more.