Anthropic / Claude

Anthropic’s claude is probably the main competing AI to OpenAI’s ChatGPT

Anthropic has an edge over OpenAI in many areas, I personally think it is better than OpenAI for Code generation

To simply chat with Claude, you can create an account at https://claude.ai/

To obtain API keys from anthropic and access the system programmatically, you will need to get the API keys from https://console.anthropic.com/

Your .env file

In the context of my AI notes, here is what you need to know about the .env file

Any file that starts with a . is a hidden file according to linux, windows is a bot funny about such files, it allows their existance, as long as you don’t try to use windows explorer to name or rename into them.

On linux, if you want the ls command to show such files, you would execute the command “ls -a

Now, with that out of the way, let me start with a few variables for various providers

# Open AI (ChatGPT)
OPENAI_API_KEY=sk-proj-xxxx
# Google AI (Gemeni)
GOOGLE_API_KEY=xxxx
# Anthropic (Claude)
ANTHROPIC_API_KEY=xxxx
# Huging face (HF_TOKEN is short for hugging face token)
HF_TOKEN=xxxx

Deep Seek

What a pleasant surprise this is, something you can run locally on your computer, or use it for a fraction of the cost that comes with OpenAI or Anthropic’s Calude !

DeepSeek-V3 is completely open-source and free. (https://github.com/deepseek-ai/DeepSeek-V3)

If you don’t have the hardware resources for it, it is also available through a website identical to that of ChatGPT and an incredibly affordable API.

How affordable ?

Deep Seek: $0.14 per million input tokens and $0.28 per million output tokens.
Claude AI : $3.00 per million input tokens and $15.00 per million output tokens
ChatGPT : $2.50 per million input tokens and $10.00 per million output tokens

So, the bottom line is that deep seek is fifty times cheaper than Claude AI, and around 35 times cheaper than openAI ! that is, two percent and three percent of the price, But what about quality

in most scenarios, it is comparable, in some cases Deep Seek wins, in other cases, claude or ChatGPT wins, but it is up there obviously !

Coding with Claude

I tried using cursor-ai for some time, basically for HTML, CSS, a bit of vanilla JavaScript, and Tailwind, not bad at all with the above, but later, after two weeks, the limit became unusable, turns out the “Free” comes with a 2 week free trial

Without it, you are switched from Claude to “Cursor-small” in the CTRL+L menu, and the autocomplete stops working

In any case, I think subscribing to cursor-ai is a good idea, the time it saves you writing things that are not core to your work is well worth it, but I wanted to experiment with something new, so….

Cursor-AI is basically a modified VS Code, and since Claude 3.5 Sonnet seems to be my favorite coding AI, i researched a bit and found that there is a plugin for VS-Code that does the same if I subscribe to Anthropic API !

So, after getting my API key from anthropic (the people behind Claude), all i needed to do was install a plugin (Tried more than one plugin, CodeGPT, and Cline by Saoud Rizwan), once installed, I need to enter my API key into the settings, and that is it.

Cline suits my needs better than CodeGPT for the time being, but i did not use them extensively yet, so it is too early to declare a winner