Unofficial-claude2-api

Latest version: v0.3.0

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

Scan your dependencies

Page 1 of 3

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`

0.2.6

CHANGELOG

- Added `model_name` string parameter into `ClaudeAPIClient` constructor, can be either `claude-2.0` or `claude-2.1`

0.2.5

CHANGELOG

BUGFIX:

File attachments now works correctly. Replaced `curl_cffi` with the `requests` module in `__prepare_file_attachment`, since the `files` parameter is not yet implemented.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.