bedRockHard
A small proxy to pass Claude API-style requests to Amazon Bedrock, specifically for claude-2
.
Some notes:
- I don't know if you need an AWS business account for that or an individual one will work.
- As of now, boto is in a weird state and the one you get from pip might be the old one which doesn't have bedrock-runtime yet. So if your aioboto install doesn't work, your best bet is to wait for a few days for them to update the SDKs properly, or patch the things manually.
- You have to request access to Claude in
https://<region>.console.aws.amazon.com/bedrock/home?region=<region>#/modelaccess
("Model Access" on the left sidebar on the Amazon Bedrock page). There's either a bug or something - for "Anthropic" section there's the "Request" button that asks you to fill all forms for Anthropic to give you access, and the "Claude Instant" model is greyed out (presumably until you fill that form), but! "Claude" (which is 1.3 and 2) can be enabled without filling that form anyway. If it's a bug - it'll probably get fixed real soon, if not - good. - You have to give your IAM account (the one you'll do the requests with) bedrock permissions - at least
InvokeModel
andInvokeModelWithResponseStream
For more info see Amazon Bedrock User Guide
Requirements: pip install aiohttp aiobotocore
(but see note above about boto)
Proxy (after you start it, put http://localhost:8123/v1
in the ST reverse proxy, of course with Claude selected):
CncAnon, 2023