2024/09/12
By
ModelBox Team
Cursor (https://www.cursor.com/) is currently generating significant buzz in the tech community, rapidly becoming one of the most popular IDEs available. This blog post explores why you should consider integrating GPT o1 preview with Cursor and provides a step-by-step guide on how to do so effectively.
Why GPT O1 (o1-preview and o1-mini)?
The OpenAI O1 Preview (o1-preview) models are designed to spend more time thinking before responding, improving their ability to reason through complex tasks in science, coding, and math. The first model of this series is now available in ChatGPT and the API, with regular updates expected.
Getting started
Install Cursor
Skip this step if you already install the cursor
If you haven't already installed Cursor, visit https://www.cursor.com/ and click "Download". Unzip the downloaded file and run the installer to complete the installation.
Set up ModelBox and obtain your API Key
Go to https://model.box/ and sign in. If you haven't already, deposit funds into your account.
You can use invite code CURSORAI to join ModelBox beta in limited time! Hurry up!
Navigate to the API Keys section and click "Create" to generate your API key.
Important: Your API key will only be displayed once, so make sure to save it securely. You'll need this key for Cursor in the following steps.
Open Cursor and configure O1 Preview
Open cursor settings in Settings > Cursor Settings,
Begin by opening the models section and clicking "Add model" (circle 2). Enter "openai/o1-preview" and enable the model (circle 3).
Next, click "Override OpenAI Base URL" to configure the ModelBox OpenAI-compatible API endpoint, https://api.model.box/v1 (circle 5). Then, enter the API key you obtained from ModelBox in the designated field (circle 6).
After enabling the OpenAI API Key by toggling the switch, you can verify your access to o1-preview and o1-mini in Cursor by clicking the "Verify" button. This process ensures proper setup and connectivity to the o1-preview and o1-mini model within the Cursor environment.
Starting using Cursor with O1 Preview (o1-preview)
You can now utilize o1-mini and o1-preview in Cursor. For example, use Command+K to toggle completion or simply press the Tab key to navigate through suggestions.
Analyze your token usage in ModelBox
After setting up o1-preview and o1-mini with Cursor, you can access your ModelBox Analytics dashboard to monitor your token usage. Additionally, you can visit the History tab to view detailed request information, including prompts, latency, cache status, and more.
About Cursor
Cursor is the AI code editor aiming to make users extraordinarily productive.
Here are some key features and aspects of Cursor:
AI assistance: Cursor integrates AI capabilities to help developers write, understand, and debug code more efficiently.
Code completion: The platform offers advanced code completion suggestions, helping developers write code faster and with fewer errors.
Natural language processing: Users can describe what they want to do in plain English, and Cursor will attempt to generate the corresponding code.
Code explanation: Cursor can provide explanations for complex code snippets, making it easier for developers to understand unfamiliar codebases.
Debugging support: The AI can assist in identifying and fixing bugs in the code.
Multi-language support: Cursor works with various programming languages, making it versatile for different types of projects.
GitHub integration: The platform integrates with GitHub, allowing for seamless version control and collaboration.
Performance: Cursor is designed to be fast and responsive, even when working with large codebases.
User interface: It features a clean, modern interface that aims to maximize productivity.
Continuous updates: As an AI-powered tool, Cursor is regularly updated to improve its capabilities and features.