You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-26Lines changed: 12 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@ OpenAI-compatible RESTful APIs for Amazon Bedrock
6
6
7
7
## Breaking Changes
8
8
9
-
This tool can now automatically detect new models supported in Amazon Bedrock.
9
+
This solution can now **automatically detect** new models supported in Amazon Bedrock.
10
10
So whenever new models are added to Amazon Bedrock, you can immediately try them without the need to wait for code changes to this repo.
11
11
12
12
This is to use the `ListFoundationModels` api and the `ListInferenceProfiles` api by Amazon Bedrock, due to this change, additional IAM permissions are required to your Lambda/Fargate role.
13
13
14
14
If you are facing error: 'Unsupported model xxx, please use models API to get a list of supported models' even the model ID is correct,
15
-
please either update your existing stack with the new template in the deployment folder or manually add below permissions to the related Lambda/Fargate role.
15
+
please either update your existing stack (**Recommended**) with the new template in the deployment folder or manually add below permissions to the related Lambda/Fargate role.
16
16
17
17
```json
18
18
{
@@ -48,19 +48,7 @@ If you find this GitHub repository useful, please consider giving it a free star
48
48
49
49
Please check [Usage Guide](./docs/Usage.md) for more details about how to use the new APIs.
50
50
51
-
> **Note:** The legacy [text completion](https://platform.openai.com/docs/api-reference/completions) API is not supported, you should change to use chat completion API.
52
-
53
-
Supported Amazon Bedrock models family:
54
-
55
-
- Anthropic Claude 2 / 3 (Haiku/Sonnet/Opus) / 3.5 Sonnet
56
-
- Meta Llama 2 / 3
57
-
- Mistral / Mixtral
58
-
- Cohere Command R / R+
59
-
- Cohere Embedding
60
-
61
-
You can call the `models` API to get the full list of model IDs supported.
62
-
63
-
> **Note:** The default model is set to `anthropic.claude-3-sonnet-20240229-v1:0` which can be changed via Lambda environment variables (`DEFAULT_MODEL`).
51
+
> **Note:** The default model is set to `anthropic.claude-3-sonnet-20240229-v1:0` which can be changed via Lambda environment variables (`DEFAULT_MODEL`). You can call the [Models API](./docs/Usage.md#models-api) to get the full list of model IDs supported.
64
52
65
53
## Get Started
66
54
@@ -224,20 +212,14 @@ Short answer is that API Gateway does not support server-sent events (SSE) for s
224
212
225
213
### Which regions are supported?
226
214
227
-
This solution only supports the regions where Amazon Bedrock is available, as for now, below are the list.
228
-
229
-
- US East (N. Virginia): us-east-1
230
-
- US West (Oregon): us-west-2
231
-
- Asia Pacific (Singapore): ap-southeast-1
232
-
- Asia Pacific (Sydney): ap-southeast-2
233
-
- Asia Pacific (Tokyo): ap-northeast-1
234
-
- Europe (Frankfurt): eu-central-1
235
-
- Europe (Paris): eu-west-3
236
-
237
215
Generally speaking, all regions that Amazon Bedrock supports will also be supported, if not, please raise an issue in Github.
238
216
239
217
Note that not all models are available in those regions.
240
218
219
+
### Which models are supported?
220
+
221
+
You can use the [Models API](./docs/Usage.md#models-api) to get/refresh a list of supported models in the current region.
222
+
241
223
### Can I build and use my own ECR image
242
224
243
225
Yes, you can clone the repo and build the container image by yourself (`src/Dockerfile`) and then push to your ECR repo. You can use `scripts/push-to-ecr.sh`
@@ -246,7 +228,11 @@ Replace the repo url in the CloudFormation template before you deploy.
246
228
247
229
### Can I run this locally
248
230
249
-
Yes, you can run this locally.
231
+
Yes, you can run this locally, e.g. run below command under `src` folder:
232
+
233
+
```bash
234
+
uvicorn api.app:app --host 0.0.0.0 --port 8000
235
+
```
250
236
251
237
The API base url should look like `http://localhost:8000/api/v1`.
0 commit comments