Adding Claude 3 Opus (or any other model) to Cursor
Cursor is a VSCode fork with built-in support for large language models (LLMs). It allows users to select code, hit Ctrl+K, write…
Here's a how Cursor, a VSCode fork with built-in GPT-4 support, crafts its API requests to GPT-4 to generate code.
{
"model": "gpt-4",
"temperature": 0,
"stop": [
"\n// End Generation Here",
"\n```"
],
"messages": [
{
"role": "system",
"content": "You are an intelligent programmer. You are helping a colleague insert a piece of code in a file.\n\nYour colleague is going to give you a file and an insertion point, along with a set of instructions. Please write code at the insertion point following their instructions.\n\nThink carefully and critically about the code to insert that best follows their instructions."
},
{
"role": "user",
"content": "This is my current file. The insertion point will be denoted by the comments: Start Generation Here and End Generation Here\n```sample3.php\n// Start Generation Here\n// End Generation Here\n\n```\n\n-------\n\n## Potentially helpful context\n\n#### file_context_0\n\nsample2.php from line 1:\n```\nHi <?php echo htmlspecialchars($\_POST['name']); ?>.\nYou are <?php echo (int)$\_POST['age']; ?> years old.\n\n```\n\n#### file_context_1\n\nsample.php from line 1:\n```\n<?php\\nif (str_contains($\_SERVER['HTTP_USER_AGENT'], 'Firefox')) {\\n echo 'You are using Firefox.';\\n}\\n?>\n\n```"
},
{
"role": "user",
"content": "## Instructions\n\n### Generation Prompt\n\ncreate some sample php code showing cool PHP features\n\n## Your Task\n\nGenerate the code to be inserted in accordance with the instructions.\n\nPlease format your output as:\n```\n// Start Generation Here\n// INSERT_YOUR_CODE\n// End Generation Here\n```"
}
],
"user": "auth0|65c48922e9e729b486601890",
"stream": true
}
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com