Creating a Simple Custom AI Assistant with OpenAI / ChatGPT

Creating a Simple Custom AI Assistant with OpenAI / ChatGPT

This tutorial goes through creating a simple AI Assistant using OpenAI’s “Assistant” feature. 

Much of the info contained in this tutorial is sourced directly from OpenAI’s documentation, albeit re-written in my own words.

OpenAI Playground: https://platform.openai.com/playground

OpenAI Docs: https://platform.openai.com/docs/

Assistants Docs: https://platform.openai.com/docs/assistants

What is an Assistant

An OpenAI Assistant on a high level is an AI that can call OpenAI models and tools (including file searching, code interpreter, and custom functions). A Thread is a list of messages between an Assistant and a User. This is a very brief overview and I highly recommend you see the OpenAI Assistant’s overview here: https://platform.openai.com/docs/assistants/overview

Creating an Open AI Assistant

Go to the OpenAI developer platform area here: https://platform.openai.com and navigate to the “Playground” area and in the left-hand menu select “Assistants”. 

In the Assistants panel you will see various settings etc. We will begin by giving our assistant a name and system instructions. You can generate system instructions by selecting the AI magic icon and describing what your assistant is for.

Next select the model and add any tools that you want your assistant to be able to access. Different models include: 

  • gpt-4o-mini
  • gpt-40
  • gpt-4-turbo
  • gpt-4
  • etc. 

For the tutorial I will keep the gpt-4o-mini model. If you enable the “File Search” tool, your assistant will have the ability to search through uploaded files (that you upload) to better answer questions related to its specific purpose, more info on the File Search tool here: https://platform.openai.com/docs/assistants/overview. If you want your assistant to be able to generate, read and run code you can enable the “Code Interpreter”, more info on the code interpreter here: https://platform.openai.com/docs/assistants/overview.  The “Functions” tool enables you to specify specific actions that your assistant can perform (such as retrieving products in an ecommerce site setup etc.), I intend to dig into the functions feature more in future tutorials.

You can easily upload files for your assistant to access via the “+ Files” button. Your assistant can reference these files during conversations.

From here we can configure various model settings including “Response format”, “Temperature”, “Top P”, and “API Version”. 

Response formats include text, json schema, and json object. 

Temperature controls how “randomly” / “creatively” the model will behave. The closer the value is to zero the more the model will act robotic, becoming repetitive etc. 

Top P in the words of OpenAI: “Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered.”

The API Version controls the API Version. The default is the latest however you can switch it to V1 as needed.

You are all set to begin messaging with and testing out your Assistant!

That’s a wrap! Simple and I hope straightforward! Follow us for more tech and AI tutorials!

Walter Miely is a tech entrepreneur and CEO of Phoenix Ignited Tech You can find him on Linkedin. This material is licensed under the CC BY 4.0 License LEGAL DISCLAIMER: The content provided here is provided AS IS, and part of, or the entirety of this content may be incorrect. Please read the entireLegal Disclaimer here.