How to

How to configure and use OpenAI o1 models in Dify.AI?

Aug 1, 2023

·

Sep 13, 2024

After a six-month break, OpenAI has today launched the OpenAI o1 series models, which excel in reasoning through complex tasks and solve harder problems in science, coding and maths. To provide developers with more efficient solutions, OpenAI has also released the o1-mini, a faster, more cost-effective inference model.

In today's AI application development, choosing and configuring the right model is crucial. Dify.AI offers a powerful platform that allows developers to easily integrate multiple AI models and flexibly select the most suitable model for different application scenarios. We have added support for OpenAI o1 model at day 0. Thanks to Dify's excellent underlying support capabilities for LLM, you can integrate any LLM you like within an hour. For detailed steps on how to quickly integrate models within an hour, please check our documentation on configuring predefined models.

Today, we will be introducing how to configure and use OpenAI's latest o1 model in Dify.AI.

Configuring the OpenAI o1 Model

  1. Obtain an API Key

First, you need to visit OpenAI's official website to get an API key. Visit the OpenAI API keys page to create, and copy your API key to Dify.AI.

Create new OpenAI secret keySetup OpenAI API key, the free sandbox plan offers 200 message quota

Currently, only ChatGPT Plus and Team users can access the o1 model. This means that ordinary users cannot directly use this latest model for now. Developers need to reach API Tier 5 (at least $1,000 paid to OpenAI) to qualify to start using the o1 model for development. Plus, the API call rate limit for the o1 model is 20 requests per minute (20 RPM).

We provide a certain amount of free quota for each account to try out the OpenAI o1 model. Just follow the guided steps on the Dify platform to start using the model. Free accounts can use 200 messages for free, and the Team version includes a quota of 10,000 messages.

  1. Set Up Model Provider in Dify

Log in to the Dify.AI at https://cloud.dify.ai and navigate to "Settings > Model Providers". Here, you can see various supported model providers. Click "Add Provider", select OpenAI, and enter your API key.

  1. Select Default Inference Model (optional)

In the Settings > Model Providers page, set the OpenAI o1 model as the system default reasoning model. This will ensure that new applications created will use the o1 model by default.

Select system default models in Dify

Using the OpenAI o1 Model

  1. Create an Application

First, log in to your Dify account. In the navigation bar, select "Studio", and you will see a list of applications. In the list, select "Create from Blank" to start creating a new application.

Create new application from blank in Dify.AI

Before creating an application, you need to understand the four different application types provided by Dify: Basic Chatbot, Text Generation, Agent, and Workflow. For this application, we choose "Chatflow (for advanced users)" under "Chatbot".

  1. Fill in Application Information

During the application creation process, you need to complete the following information:

  • Name: Give your chat assistant an easily recognizable name.

  • Icon: Choose a suitable icon or upload an image you like as the icon.

  • Description: Use concise and clear text to describe the purpose of this application, for easy future use within the team.


  1. Select OpenAI o1 models in Chatflow

On the chatflow configuration page, select the OpenAI o1 model as the default model.

Configure OpenAI o1 model in Chatflow

Once configured, you can use the OpenAI o1 model in various application scenarios within Dify.AI. Whether it's scientific research, code generation, or complex mathematical problems, the o1 model can provide powerful reasoning and solving capabilities.

A basic chatflow using OpenAI o1 models for reasoning

Then click the "Publish" button in the upper right corner, then click the "Run App" to start using OpenAI o1.

Publish and Run App

One of Dify.AI's significant features is its support for multiple models. Users can integrate multiple different AI models within the same project and flexibly select and switch according to specific needs. Here, you can switch and try out Claude, Llama 3, and other OpenAI models with just a few clicks.

Through this article, you should have a clear understanding of how to configure and use the OpenAI o1 model on the Dify.AI platform. We hope this guide helps you fully utilize these powerful AI models to improve work efficiency and innovation capabilities.

Feel free to check the help documentation and use Chatflow to quickly start building LLM applications. Additionally, we provide related application templates on the exploration page to help you get started quickly and experience the latest features. Give it a try!

If you like Dify, feel free to:

  • Contribute code on GitHub and co-build a better Dify with us;

  • Share Dify and your usage experience with your friends through online and offline activities and social media;

  • Give us a star on GitHub: https://github.com/langgenius/dify