OpenAI_GPTs_AssistantAPI_examples
OpenAI_GPTs_AssistantAPI_examples copied to clipboard
Welcome to the repository showcasing examples utilizing OpenAI tools, such as GPT, assistant API (retrieval, function calling to external API). I strongly recommend running through the provided sample...
OpenAI GPTs Assistant API Examples
Welcome to the repository showcasing examples utilizing OpenAI tools. I strongly recommend running through the provided sample code and viewing the referenced instructional videos for a comprehensive understanding. Thanks to the video creaters for sharing their knowledge.
Prerequisites:
-
Obtain an OpenAI API Key: Secure and save your
OPENAI_API_KEY='sk-'
in an.env
file. You can obtain your API key from OpenAI API-keys. - Obtain Other API Keys: I also used Google API and Airtable API in the final example, but it is possible to modify the code and skip those.
- Install Proper Tools and Packages
Note: APIs typically require putting a card on file, and it's crucial to set a spending limit to avoid unintended charges!
Implementing Auction Schema for GPTs
Enhance your GPTs with an auction schema. This requires simple copy-pasting into the OpenAI URL.
- Sample Schema/Instruction 'Code': Weather GPTs Python Script
- Reference Videos: YouTube Tutorial
- GPT End Result: OpenAI Chat Interface
Pros:
- Ease of Implementation: A straightforward process.
- Minimal Coding: Little to no coding is required.
- Ready-to-Use Interface: Immediate access to a user-friendly interface.
Cons:
- Auction and Schema Clarity: The details of the auction schema might not be clear (at least to me).
- Integration Limitations: Currently lacks the ability to integrate with external systems or link to websites outside the OpenAI ecosystem.
Assistant API (Retrieval and Functional Calling)
Explore the capabilities of the Assistant API from basic retrieval to advanced functional calling and an end to end chatbot build
Version 0:
Get familiar with assistant tools (retrieval, code-interpretation, functions).
- Files: Assistant API v0 Repository
- Reference Videos:
Version 1:
Follow along with a YouTube tutorial to create an end-to-end (toy) chatbot using the Assistant API, deployable to any website.
- Files: Assistant API v1 Repository
- Reference Video: Building and Deploying a Chatbot
Finally, take a look at the last section of the additional settings in GPTs.
