LLMing for free

David Gasquez December 20, 2024
Source
You can use the awesome llm tool for free with one of the best models available today! In this small post, I'll show you how to do it in a few easy steps. We'll setup llm with the new Gemini models from Google. These are currently Top #1 and #2 in LLM arena benchmarks. Install llm I recommend installing llm using the uv tool install command from uv. Since we'll be using Gemini models, we need to install the Gemini plugin too. Now you should have the command llm available in your CLI. Configuring llm This step is easy. Go to Google AI Studio and grab an API key from the big blue Get API key. Then, run this command so llm asks you about the keys. Once the key is set, you're done! You should be able to run something like this with your preferred prompt. Using llm The most straightforward way of using llm is as shown before. To make things smoother, let's set a default model. There are many models (you can list them with llm models). Here are two that make a perfect default models given the ones available today: gemini-2.0-flash-exp or gemini-2.0-flash-thinking-exp-1219. That's it! You can now use llm directly without any flags. Speaking of flags though, there are a few interesting ones you should know. -s to set the system prompt to use. -a to attach images, audio, or videos to the prompt. -o to pass some key value options to the model. The Gemini models options are codeexecution and jsonobject. --- There are many more ways to use llm. I've written about some of them previously and am sure you'll find some other interesting uses. Enjoy LLMing for free while it lasts!

Discussion in the ATmosphere

Loading comments...