@@ -15,35 +15,7 @@ export API_URL=<API URL>
1515export API_KEY=< API Key>
1616```
1717
18- 1 . ` /api/converse `
19-
20- ``` bash
21- curl -N " ${API_URL} /api/converse" \
22- --header ' Content-Type: application/json' \
23- --header " Authorization: Bearer ${API_KEY} " \
24- --data ' {
25- "messages": [
26- {
27- "role": "user",
28- "content": [
29- {
30- "text": "Hi"
31- }
32- ]
33- }
34- ],
35- "modelId": "anthropic.claude-3-5-sonnet-20240620-v1:0",
36- "region": "us-west-2"
37- }'
38- ```
39-
40- This API is used to implement streaming conversations, and it only returns the text and token usage for display.
41-
42- The ` messages ` under body fully complies with the messages structure specification in Amazon
43- Bedrock [ converse stream] ( https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/converse_stream.html )
44- API. You can also add ` image ` or ` document ` according to the specification to support multimodal conversations.
45-
46- 2 . ` /api/converse/v2 `
18+ 1 . ` /api/converse/v3 `
4719
4820 ``` bash
4921 curl -N " ${API_URL} /api/converse" \
@@ -69,14 +41,14 @@ export API_KEY=<API Key>
6941 }'
7042 ```
7143
72- This API is used to implement streaming conversations for v2, and it returns the raw Amazon Bedrock response json string,
44+ This API is used to implement streaming conversations for v2, and it returns the raw Amazon Bedrock response json string chunk splited by ` \n\n ` ,
7345 you need to parse it for display.
7446
7547 The ` messages ` under body fully complies with the messages structure specification in Amazon
7648 Bedrock [ converse stream] ( https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/converse_stream.html )
7749 API. You can also add ` image ` or ` document ` according to the specification to support multimodal conversations.
7850
79- 3 . ` /api/image `
51+ 2 . ` /api/image `
8052
8153 ``` bash
8254 curl " ${API_URL} /api/image" \
@@ -93,7 +65,7 @@ export API_KEY=<API Key>
9365
9466 This API is used to generate images and returns a base64 encoded string of the image.
9567
96- 4 . ` /api/models `
68+ 3 . ` /api/models `
9769
9870 ``` bash
9971 curl " ${API_URL} /api/models" \
@@ -108,7 +80,7 @@ export API_KEY=<API Key>
10880 This API is used to get a list of all streaming-supported text models and image generation models in the specified
10981 region.
11082
111- 5 . ` /api/upgrade `
83+ 4 . ` /api/upgrade `
11284 ``` bash
11385 curl " ${API_URL} /api/upgrade" \
11486 --header ' Content-Type: application/json' \
0 commit comments