in

How to Use OpenAI's Assistants API v2 (step-by-step + easter egg)



In this video, I dive into the OpenAI Assistants API v2, showcasing how to effectively use its core functions to enhance your AI agents. You’ll learn about function calling, which equips your AI with additional capabilities on top of a robust knowledge base and powerful prompts. I also demonstrate how to use these functions within a custom GPT to create versatile assistants without writing any code. Plus, I’ll show you how to update and interact with these assistants using my Replit microservice. This tutorial is ideal for anyone looking to build and manage AI assistants seamlessly.

Link to Google Colab (for Core Assistant API v2 functions + GUI):
https://colab.research.google.com/drive/1WEjPWgZcETAFPYDcCJEA8-aBpqQShe8Q?usp=sharing

Link to Google Colab (for Assistant API v2 Function Calling):
https://colab.research.google.com/drive/1f-4MGO_aLWOmR3Jz8YyKz_aQpjqpvJjZ?usp=sharing

Link to Replit to Create Assistants in ChatGPT:
https://replit.com/@MarkK24/assistantapiconnector

Link to Scrape of Assistants API Documentation:
1) https://bit.ly/3VDXC4Y
2) https://bit.ly/3xeFCVz

Visit My Agency Website: https://bit.ly/4cD9jhG

Build Your AI Receptionist With Us: https://bit.ly/4e0sS4A

Work Together on Fiverr: https://bit.ly/3XorT7R

Book a Consultation: https://bit.ly/3Ml5AKW

Join My Newsletter: https://bit.ly/3WVEHlK

About Me:
Hello! I’m Mark, a seasoned Data Science Manager by day and an AI automation agency owner by night, hailing from Canada with a decade in the AI space. At Prompt Advisers, we specialize in cutting-edge AI solutions, helping individuals, businesses, and agencies fully harness applied AI. Having been featured in interviews and recognized for our innovative contributions, we’re dedicated to guiding you through the AI landscape.

My Goal:
My mission is to empower you with the knowledge to explore AI technology in your ventures, whether you’re an individual, a business, or an agency. I aim to help you leverage applied AI to its fullest potential, providing insights, sharing experiences, and offering partnerships to bring your visions to life.

#AssistantsAPI #OpenAI #FunctionCalling #CustomGPT #AIagents #Replit #TechTutorial #ArtificialIntelligence #AITools #AIIntegration #GPT4Omni #gpt4o

0:00 – Overview of the Assistant API
0:05 – Importance of Assistant API for AI
0:12 – Core Functions and Examples
0:18 – Function Calling with Perplexity and Assistant API
0:31 – Easter Egg: Creating Assistants in ChatGPT
0:47 – High-Level Overview of Assistant API
0:53 – Assistant and Thread Objects Explained
1:05 – Assistant Creation Process Overview
1:16 – Choosing Models, Files, and Tools
1:21 – Instructions and Tool Integration
1:35 – Thread Object: Managing Conversations
1:40 – Run Step and Message Processing
1:58 – Common Run Statuses Explained
2:23 – Example: Requires Action for Tool/API Call
2:35 – Expired, Canceled, Failed Statuses
2:53 – Big Picture: How Assistant API Works
3:01 – Setting Up the First AI Assistant
3:25 – Demo: Checking for Existing Assistant
3:46 – Metadata Explanation for Existing Assistant
4:05 – Creating a New Assistant with Vector Database
4:44 – Uploading and Embedding PDFs
5:18 – Demo: Creating New Assistant and Uploading PDF
5:50 – Upload Complete, Assistant ID Generated
6:09 – Vector Database for File Search
6:53 – Enabling File Search Manually
7:17 – Adding Multiple Files to Vector Database
7:36 – Example: Uploading Two Text Files
8:02 – Updating an Existing Assistant Programmatically
8:45 – Demo: Sending Message and Managing Thread
9:19 – Walking Through Run Status During Conversations
9:55 – Back-and-Forth Conversation with Assistant
10:50 – Continuous Conversation Loop in Google Colab
11:28 – Adding Tools and Function Calling
12:00 – Overview: Function Calling and Tool Setup
12:35 – Installing Libraries and Setting Up API Keys
12:58 – Perplexity Search in Assistant API
13:32 – Overview: Perplexity API Documentation
14:05 – Using Perplexity Function and Tool Description
14:58 – Demo: Running Assistant API with Perplexity
15:30 – Example: Asking NBA Scores with Function Calling
16:16 – Function Calling Improves Assistant Accuracy
16:54 – Viewing Assistant in Playground
17:33 – Hosting Assistant API with Replit
18:00 – Using Replit API for Perplexity Search
18:40 – Postman Demo: Sending Requests from Replit
19:18 – Creating Assistants with ChatGPT Custom GPT
19:58 – Demo: Creating Travel Assistant with Custom GPT
20:35 – Sending Messages to Custom Assistant
21:00 – Replit Code: Building Custom API
21:56 – Conclusion: Key Learnings and Summary
22:17 – Final Tips: Expanding Assistants with Features
22:35 – Outro: Ask for Additional Tutorials

Graphic from Anthropic alongside the debut of their new Claude 3.5 AI models, including Sonnet and Haiku, and a new feature enabling computer control by artificial intelligence.

Anthropic unveils new Claude AI models and ‘computer control’