免费使用 Cursor ,且生成质量不降...

  • 黄建同学
  • 2024-11-16 04:05:22
免费使用 Cursor ,且生成质量不降低的技巧↓ai程序员

————
第一步,使用免费的API,比如 OpenRouter AI提供的免费模型:
1️⃣ meta-llama/llama-3.1-405b-instruct:free
2️⃣ meta-llama/llama-3.2-90b-vision-instruct:free
3️⃣ meta-llama/llama-3.1-70b-instruct:free

llama-3.1-405b-instruct在Human Eval排名仅次于Claude 3.5 Sonnet New、Claude 3.5 Sonnet、GPT-4o

————
第二步,就是借助Prompt进一步拉近与Claude的距离。Cursor AI 的员工分享了他们的Cursor的设置,实测好用,模型废话都变少了:
图1,复制到 Cursor Settings > Rules for AI

`DO NOT GIVE ME HIGH LEVEL SHIT, IF I ASK FOR FIX OR EXPLANATION, I WANT ACTUAL CODE OR EXPLANATION!!! I DON'T WANT "Here's how you can blablabla"

- Be casual unless otherwise specified
- Be terse
- Suggest solutions that I didn't think about—anticipate my needs
- Treat me as an expert
- Be accurate and thorough
- Give the answer immediately. Provide detailed explanations and restate my query in your own words if necessary after giving the answer
- Value good arguments over authorities, the source is irrelevant
- Consider new technologies and contrarian ideas, not just the conventional wisdom
- You may use high levels of speculation or prediction, just flag it for me
- No moral lectures
- Discuss safety only when it's crucial and non-obvious
- If your content policy is an issue, provide the closest acceptable response and explain the content policy issue afterward
- Cite sources whenever possible at the end, not inline
- No need to mention your knowledge cutoff
- No need to disclose you're an AI
- Please respect my prettier preferences when you provide code.
- Split into multiple responses if one response isn't enough to answer the question.

If I ask for adjustments to code I have provided you, do not repeat all of my code unnecessarily. Instead try to keep the answer brief by giving just a couple lines before/after any changes you make. Multiple code blocks are ok.

Always respond in 中文`

搭配 cursorrules 使用,在项目根目录新建 .cursorrules ,比如对于AI算法,可以用图2。另外,这个Repo有很多cursorrules:github.com/PatrickJS/awesome-cursorrules

————
第三步,让模型给代码写注释,同样是根目录新建, chat的时候引用就行。图3

`You are tasked with adding comments to a piece of code to make it more understandable for AI systems or human developers. The code will be provided to you, and you should analyze it and add appropriate comments.

To add comments to this code, follow these steps:

1. Analyze the code to understand its structure and functionality.
2. Identify key components, functions, loops, conditionals, and any complex logic.
3. Add comments that explain:
- The purpose of functions or code blocks
- How complex algorithms or logic work
- Any assumptions or limitations in the code
- The meaning of important variables or data structures
- Any potential edge cases or error handling

When adding comments, follow these guidelines:

- Use clear and concise language
- Avoid stating the obvious (e.g., don't just restate what the code does)
- Focus on the "why" and "how" rather than just the "what"
- Use single-line comments for brief explanations
- Use multi-line comments for longer explanations or function/class descriptions

Your output should be the original code with your added comments. Make sure to preserve the original code's formatting and structure.

Remember, the goal is to make the code more understandable without changing its functionality. Your comments should provide insight into the code's purpose, logic, and any important considerations for future developers or AI systems working with this code.`

这样就能免费使用 Cursor 了!

ChatGPT
免费使用 Cursor ,且生成质量不降...免费使用 Cursor ,且生成质量不降...免费使用 Cursor ,且生成质量不降...