File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ To create an `AnthropicBedrockClient` from a `BedrockRuntimeClient` with a `Mode
105
105
The API usage is the same as the normal AnthropicClient.
106
106
107
107
``` swift
108
- let client = try BedrockRuntimeClient (region : " USEast1 " )
109
- let anthropic = BedrockRuntimeClient .useAnthropic (client, model : . claude_3_Haiku )
108
+ let client = try BedrockRuntimeClient (region : " us-west-2 " )
109
+ let anthropic = client .useAnthropic ()
110
110
111
111
let response = try await anthropic.messages .createMessage (Message (role : .user , content : [.text (" This is test text" )]), maxTokens : 1024 )
112
112
for content in response.content {
@@ -122,8 +122,8 @@ for content in response.content {
122
122
Of course, ` Streaming Message API ` works in the same way.
123
123
124
124
``` swift
125
- let client = try BedrockRuntimeClient (region : " USEast1 " )
126
- let anthropic = BedrockRuntimeClient .useAnthropic (client, model : . claude_3_Haiku )
125
+ let client = try BedrockRuntimeClient (region : " us-west-2 " )
126
+ let anthropic = client .useAnthropic ()
127
127
128
128
let stream = try await anthropic.messages .streamMessage ([Message (role : .user , content : [.text (" This is test text" )])], maxTokens : 1024 )
129
129
for try await chunk in stream {
You can’t perform that action at this time.
0 commit comments