mirror of
https://github.com/jbranchaud/til
synced 2026-01-21 07:58:02 +00:00
Compare commits
2 Commits
f3d7cf8a06
...
1b229b39f1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b229b39f1 | ||
|
|
2543651ec0 |
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
|
|||||||
|
|
||||||
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
|
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
|
||||||
|
|
||||||
_1414 TILs and counting..._
|
_1416 TILs and counting..._
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -558,6 +558,7 @@ _1414 TILs and counting..._
|
|||||||
### LLM
|
### LLM
|
||||||
|
|
||||||
- [Send cURL To Claude Text Completion API](llm/send-curl-to-claude-text-completion-api.md)
|
- [Send cURL To Claude Text Completion API](llm/send-curl-to-claude-text-completion-api.md)
|
||||||
|
- [Use The llm CLI With Claude Models](llm/use-the-llm-cli-with-claude-models.md)
|
||||||
|
|
||||||
### Mac
|
### Mac
|
||||||
|
|
||||||
@@ -825,6 +826,7 @@ _1414 TILs and counting..._
|
|||||||
- [Access Instance Variables](python/access-instance-variables.md)
|
- [Access Instance Variables](python/access-instance-variables.md)
|
||||||
- [Create A Dummy DataFrame In Pandas](python/create-a-dummy-dataframe-in-pandas.md)
|
- [Create A Dummy DataFrame In Pandas](python/create-a-dummy-dataframe-in-pandas.md)
|
||||||
- [Test A Function With Pytest](python/test-a-function-with-pytest.md)
|
- [Test A Function With Pytest](python/test-a-function-with-pytest.md)
|
||||||
|
- [Use pipx To Install End User Apps](python/use-pipx-to-install-end-user-apps.md)
|
||||||
|
|
||||||
### Rails
|
### Rails
|
||||||
|
|
||||||
|
|||||||
26
llm/use-the-llm-cli-with-claude-models.md
Normal file
26
llm/use-the-llm-cli-with-claude-models.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Use The llm CLI With Claude Models
|
||||||
|
|
||||||
|
[Simon Willison's `llm`](https://llm.datasette.io/en/stable/index.html) can be
|
||||||
|
used with a bunch of different models (local and API). The whole thing is
|
||||||
|
plugin driven. To use a specific model, you'll need to install the plugin for
|
||||||
|
it. For instance, to use the [Claude 3 family of
|
||||||
|
models](https://www.anthropic.com/news/claude-3-family) you need to install
|
||||||
|
`llm-claude-3`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ llm install llm-claude-3
|
||||||
|
```
|
||||||
|
|
||||||
|
Then when prompting `llm`, specify which of the Claude models you want to use —
|
||||||
|
`claude-3-haiku`, `claude-3-sonnet`, or `claude-3-opus` — with the `-m` flag:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ llm \
|
||||||
|
-m claude-3-haiku \
|
||||||
|
--key $CLAUDE_API_KEY \
|
||||||
|
'Show me the SQL query to create a cocktails table.'
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: instead of adding my Claude API key to the key store, I've opted to
|
||||||
|
include it with the `--key` flag via an environment variable that I've set
|
||||||
|
ahead of time.
|
||||||
31
python/use-pipx-to-install-end-user-apps.md
Normal file
31
python/use-pipx-to-install-end-user-apps.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Use pipx To Install End User Apps
|
||||||
|
|
||||||
|
The [`pipx`](https://pipx.pypa.io/stable/) tool is an installer for the python
|
||||||
|
ecosystem. It differs from `pip` in that it is for installing end-user
|
||||||
|
applications and it does so in isolated environments.
|
||||||
|
|
||||||
|
You can install `pipx` with an OS-specific installer like Homebrew:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ brew install pipx
|
||||||
|
```
|
||||||
|
|
||||||
|
Ensure `pipx`-installed apps are on your path:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ pipx ensurepath
|
||||||
|
```
|
||||||
|
|
||||||
|
Then use `pipx` to install programs like
|
||||||
|
[`cowsay`](https://pypi.org/project/cowsay/) or
|
||||||
|
[`llm`](https://llm.datasette.io/en/stable/setup.html):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ pipx install llm
|
||||||
|
|
||||||
|
$ which llm
|
||||||
|
/Users/jbranchaud/.local/bin/llm
|
||||||
|
|
||||||
|
$ llm --version
|
||||||
|
llm, version 0.13.1
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user