当前位置:首页>文章>工具配置>Cursor IDE安装与APIKey配置指南

Cursor IDE安装与APIKey配置指南

前言

      文章底部有接入教程哦~,添加客服二维码,发送口令【领取福利】,免费领取体验额度。

1. Cursor 安装

默认情况下
访问 Cursor 官网,页面会根据你的系统自动匹配安装包,比如我是 WINDOWS,就会出现 Download for
WINDOWS 按钮:
Cursor IDE安装与APIKey配置指南

下载完成后,双击.exe文件启动安装程序。按照提示接受许可协议,选择安装路径,可以选择创建桌面快捷方式或添加到系统路径以方便命令行访问。完成安装后,点击“Finish”退出安装程序。

2. 注册与登录

在安装包安装后要设置一些配置信息,语言我们选择中文:
Cursor IDE安装与APIKey配置指南

如果本机之前安装过 VS Code,可以导入 VS Code 的扩展:
Cursor IDE安装与APIKey配置指南

首次使用 Cursor 时,需要注册一个新账号或使用已有账号进行登录,也可以用 Github
等授权登录。
Cursor IDE安装与APIKey配置指南

这里勾选默认即可,点 Continue 按钮完成设置:
Cursor IDE安装与APIKey配置指南

3. Cursor 配置

▌ 配置路径

› 打开 Settings → 进入 Models 面板

▌ 核心参数设置

› ​OpenAI API Key

 - 填入 创建的自定义令牌

› ​OpenAI Base URL

 - https://yibuapi.com/v1

› ​Add model 选项:

 - 输入与令牌绑定的「自定义模型名称」,查看支持的模型请参考这篇教程模型在线查询
Cursor IDE安装与APIKey配置指南
Cursor IDE安装与APIKey配置指南

4. 成功验证

▌ 测试流程

› 重启 Cursor IDE 激活配置

› 按住ctrl+K键,弹出一行窗口,输入自己想要的功能。
Cursor IDE安装与APIKey配置指南
Cursor IDE安装与APIKey配置指南

他会自己一行一行快速写代码。这里我把他写的alexnet模型代码贴在这里。

import torch.nn as nn

class AlexNet(nn.Module):
    def __init__(self, num_classes=1000):
        super(AlexNet, self).__init__()
        self.features = nn.Sequential(
            nn.Conv2d(3, 64, kernel_size=11, stride=4, padding=2),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(kernel_size=3, stride=2),
            nn.Conv2d(64, 192, kernel_size=5, padding=2),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(kernel_size=3, stride=2),
            nn.Conv2d(192, 384, kernel_size=3, padding=1),
            nn.ReLU(inplace=True),
            nn.Conv2d(384, 256, kernel_size=3, padding=1),
            nn.ReLU(inplace=True),
            nn.Conv2d(256, 256, kernel_size=3, padding=1),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(kernel_size=3, stride=2),
        )
        self.avgpool = nn.AdaptiveAvgPool2d((6, 6))
        self.classifier = nn.Sequential(
            nn.Dropout(),
            nn.Linear(256 * 6 * 6, 4096),
            nn.ReLU(inplace=True),
            nn.Dropout(),
            nn.Linear(4096, 4096),
            nn.ReLU(inplace=True),
            nn.Linear(4096, num_classes),
        )

    def forward(self, x):
        x = self.features(x)
        x = self.avgpool(x)
        x = x.view(x.size(0), 256 * 6 * 6)
        x = self.classifier(x)
        return x
资源准备与二维码展示
使用指南

使用一步 API批量制作涂色本:低成本、高效率的创作方案

2025-6-20 17:35:27

工具配置

Chatbox多端一键配置Claude/GPT/DeepSeek等主流模型

2025-6-18 14:42:44

搜索