Cursor 可以試用 GPT-4.1

本帖最後由 javacomhk 於 2025-4-17 01:33 編輯

Cursor 使用 GPT-4.1 (新用戶 Pro Trial 有 14天免費使用)

Cursor is a new AI-powered code editor based on VSCode, but it is a separate application from Visual Studio Code. Here’s what you need to know:
1. Cursor vs. VSCode
Cursor is a standalone code editor, forked from VSCode, with built-in AI features (like the AI assistant you’re using now).
VSCode is the original open-source code editor from Microsoft.
You cannot install Cursor as an extension inside VSCode.
You can use both editors side-by-side, but they are separate apps.

The AI Code Editor https://www.cursor.com/

1. 下載 MACOS 版本 及安裝

2. 開啟及登記後,在Cursor Settings,找到Models選項,在裡面勾選gpt-4.1模型如下



3. 測試 gpt-4.1 如下 Create a game that is a mixture of two classic games. Make it in pygame and make it look pretty.



4. Code https://pastebin.com/iVcqRLXN


Comparing it with Grok 3 code at https://x.ai/news/grok-3

終於有個 AI code Assistant 好似 Grok 3 咁可以正常 run 到
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

3個 Prompt 例子去提升 GPT-4.1 能力

Prompt 如下:

You are an agent – please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user. Only terminate your turn when you are sure that the problem is solved.

(你是一個代理人,在問題完全解決之前請持續處理,勿提前結束。)

If you are not sure about file content or codebase structure pertaining to the user’s request, use your tools to read files and gather the relevant information: do NOT guess or make up an answer.

(請優先使用工具確認資訊,勿憑空猜測」的提醒語,可促使 AI 積極調用內建檔案檢閱等功能,以真實資料為依據進行回應,顯著降低幻覺發生率)

You MUST plan extensively before each function call, and reflect extensively on the outcomes of the previous function calls. DO NOT do this entire process by making function calls only, as this can impair your ability to solve the problem and think insightfully.

(務必在每次工具使用前後進行詳細規劃與反思)

TOP