how.wtf

OpenAI Assistants vs GPTs

· Thomas Taylor

The difference between OpenAI Assistants and GPTs

OpenAI has two products that are similar: Assistants and GPTs. In this article, we’ll discuss the differences between the two.

What are OpenAI GPTs?

GPTs (custom versions of ChatGPT) are specialized tools designed to cater to specific needs and preferences. They enable users, including those without coding skills, to tailor ChatGPT for distinct tasks or interests.

Users can create GPTs for private or public use, with the forthcoming GPT Store showcasing creations from verified builders in various categories like productivity and education. GPTs emphasize privacy and safety, ensuring user data is controlled and protected, with options for integrating third-party APIs and using chats for model improvement. This feature is particularly beneficial for enterprise customers, allowing them to develop internal-only GPTs for specific company needs. The initiative represents a step towards more interactive and capable AI systems, termed “agents,” and reflects OpenAI’s commitment to involving a broader community in AI development.

ChatGPT Plus now offers updated information and simplified access to various tools, including DALL·E, web browsing, and file attachments for enhanced user experience.

What are OpenAI Assistants?

OpenAI Assistants are AI tools integrated within applications, designed to respond to user queries with tailored instructions and capabilities. They use various models and leverage specific tools, such as Code Interpreter, Retrieval, and Function calling, to provide targeted responses and solutions.

The Assistants API enables developers to embed AI assistants into their own platforms, enhancing the functionality and user interaction experience. This API is an adaptable framework, set to expand with more OpenAI-developed tools and options for custom tool integration.

OpenAI Assistant Example

Using the OpenAI open-source Python module, we can leverage assistants easily:

WARNING: This code uses the beta OpenAI client.

 1from time import sleep
 2
 3from openai import OpenAI
 4
 5
 6def wait_for_run(run, thread):
 7    while run.status in ["queued", "in_progress"]:
 8        run = client.beta.threads.runs.retrieve(
 9            thread_id=thread.id,
10            run_id=run.id,
11        )
12        sleep(0.5)
13    return run
14
15
16client = OpenAI()
17
18assistant = client.beta.assistants.create(
19    instructions="You are a ghost writer for the famous wrapper Eminem. When asked to write an song, write in an Enimen-like rhyme scheme.",
20    model="gpt-4-1106-preview",
21)
22
23thread = client.beta.threads.create(
24    messages=[{"role": "user", "content": "Write a song about AI."}]
25)
26
27run = client.beta.threads.runs.create(thread_id=thread.id, assistant_id=assistant.id)
28
29run = wait_for_run(run, thread)
30messages = client.beta.threads.messages.list(thread.id)
31print(messages.data[0].content[0].text.value)

From a high-level, this code does the following:

  1. Creates a thread with a prepopulated message from the user with the message “Write a song about AI.”
  2. Runs the assistant on the thread
  3. Polls the run for a completion status every half-second
  4. Prints the latest message’s content

What is the difference between Assistants and GPTs?

tl;dr - Assistants are accessed through OpenAI’s API for developers. GPTs are used to personalize the ChatGPT experience.

The key difference between Assistants and GPTs is their application and integration scopes. Assistants are primarily API-driven tools meant for embedding within external applications, focusing on enhancing functionality with specific tasks like code interpretation, information retrieval, and function execution. They are components in a broader system, augmenting existing applications with AI capabilities.

On the other hand, GPTs are standalone, user-customized versions of ChatGPT, designed to fulfill varied personal, educational, or professional needs. While Assistants enhance specific functionalities within applications, GPTs are more about creating a personalized ChatGPT experience, tailored to the user’s unique requirements.

#generative-ai   #python  

Reply to this post by email ↪