Unofficial-claude-api

Latest version: v0.3.2

Safety actively analyzes 625566 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.3.2

CHANGELOG

Issue 21 :
- Removed `model_name` parameter check, allowing to choose any model in `ClaudeAPIClient` constructor.

- Fixed file upload and attachments, now it's possible to send images to Claude 3.

- Updated `README.md` with the official link for gathering the `model_name` strings.

0.3.1

CHANGELOG

Project renamed from `unofficial-claude2-api` to `unofficial-claude-api`

CHANGES FOR DEVS

- Please rename your package reference in your `requirements.txt` to the appropriate repository name.

- (Optional) Rename package imports from `claude2_api` to `claude_api`, a backward compatibility import for `claude2_api` was left if you still want to use the old name.

0.3.0

CHANGELOG

- `model_name` parameters defaults to None, allowing to choose latest model by default,
can be overriden using either `claude-2.0` or `claude-2.1` string.

- Updated README.md to reflect changes.

0.2.9

CHANGELOG

SOCKS proxies implemented (see 16)

Import `SOCKSProxy` out of `claude2_api.client` module and construct it using these fields:

- `proxy_ip`
- `proxy_port`
- `version_num` which can be either 4 or 5 (defaults to 4).

If you'd like to use `HTTPProxy` instead, import it as usual, and set the same fields for ip and port and also the `use_ssl` field.

Both of these classes inherit from `ClaudeProxy`, and they can be assigned to the `ClaudeAPIClient` constructor.

0.2.8

CHANGELOG

- Updated Claude endpoint for `send_message`, fixes 14
- Request payload and response parsing updated accordingly.

0.2.7

CHANGELOG:

- Changed `send_message` response parsing strategy
- `error_response` is now called `raw_answer`, and it holds the `response.content` from the `send_message` response, used for inspections purposes.
- Implemented a new Claude error `OverloadError`

MISCELLANOUS IMPROVEMENTS

- All the api errors now inherits from `ClaudeAPIError`
- Moved errors into `claude2_api.errors`
- Replaced `requests.Session` with `requests.post` in `__prepare_file_attachment`, as the headers were incorrectly set.
- Clarified the error "[400] Unable to prepare file attachment" in the Troubleshotting section of `README.md`

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.