Upgrade to new Anthropic SDK, supports Python 3.13

Refs #16
This commit is contained in:
Simon Willison
2024-11-04 10:33:05 -08:00
parent 6c3e2fb0b6
commit b5b19b7644
4 changed files with 4 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
@@ -38,7 +38,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

View File

@@ -14,14 +14,6 @@ Install this plugin in the same environment as [LLM](https://llm.datasette.io/).
llm install llm-claude-3
```
The plugin may fail to install on **Python 3.13** due to a dependency problem. A temporary workaround for that problem is to run this:
```bash
llm install https://github.com/simonw/anthropic-sdk-python/archive/a6f35b4554b265d5e08c2bbe308dba65d1078cf5.zip
llm install llm-claude-3
```
See [this issue](https://github.com/simonw/llm-claude-3/issues/16) for further details.
## Usage
First, set [an API key](https://console.anthropic.com/settings/keys) for Claude 3:

View File

@@ -10,7 +10,7 @@ classifiers = [
]
dependencies = [
"llm>=0.17",
"anthropic>=0.37.1",
"anthropic>=0.39.0",
]
[project.urls]