Skip to content

Commit 0dda669

Browse files
authored
Merge branch 'main' into swift-bedrock
2 parents 2b4d6e5 + de1d84f commit 0dda669

File tree

94 files changed

+5964
-383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+5964
-383
lines changed

.doc_gen/metadata/bedrock-agent_metadata.yaml

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ bedrock-agent_PrepareAgent:
185185
- python.example_code.bedrock-agent.PrepareAgent
186186
services:
187187
bedrock-agent: {PrepareAgent}
188+
189+
188190
bedrock-agent_GettingStartedWithBedrockAgents:
189191
title: An end-to-end example showing how to create and invoke &BRA; using an &AWS; SDK
190192
title_abbrev: Create and invoke an agent
@@ -209,3 +211,225 @@ bedrock-agent_GettingStartedWithBedrockAgents:
209211
services:
210212
bedrock-agent: {CreateAgent, CreateAgentActionGroup, CreateAgentAlias, DeleteAgent, DeleteAgentAlias, GetAgent, ListAgentActionGroups,
211213
ListAgents, ListAgentKnowledgeBases, PrepareAgent}
214+
215+
216+
217+
bedrock-agent_GettingStartedWithBedrockFlows:
218+
title: An end-to-end example showing how to create and invoke an Amazon Bedrock flow using an &AWS; SDK
219+
title_abbrev: Create and invoke a flow
220+
synopsis_list:
221+
- Create an execution role for the flow.
222+
- Create the flow.
223+
- Deploy the fully configured flow.
224+
- Invoke the flow with user-provided prompts.
225+
- Delete all created resources.
226+
category: Scenarios
227+
languages:
228+
Python:
229+
versions:
230+
- sdk_version: 3
231+
github: python/example_code/bedrock-agent
232+
excerpts:
233+
- description: Generates a music playlist based on user-specified genre and number of songs.
234+
snippet_tags:
235+
- python.example_code.bedrock-agent-runtime.Scenario_GettingStartedBedrockFlows
236+
- python.example_code.bedrock-agent-runtime.flow_invoke_flow
237+
- python.example_code.bedrock-agent-runtime.run_playlist_flow
238+
- python.example_code.bedrock-agent-runtime.Scenario_GettingStartedBedrockFlows_iam_role
239+
240+
services:
241+
bedrock-agent: {CreateFlow, CreateFlowAlias, CreateFlowVersion, DeleteFlow, DeleteFlowVersion, DeleteFlowAlias, GetFlow, GetFlowAlias,
242+
GetFlowVersion, PrepareFlow}
243+
bedrock-agent-runtime: {InvokeFlow}
244+
245+
246+
bedrock-agent_CreateFlow:
247+
languages:
248+
Python:
249+
versions:
250+
- sdk_version: 3
251+
github: python/example_code/bedrock-agent
252+
excerpts:
253+
- description: Create an Amazon Bedrock flow.
254+
snippet_tags:
255+
- python.example_code.bedrock-agent.create_flow
256+
services:
257+
bedrock-agent: {CreateFlow}
258+
259+
bedrock-agent_PrepareFlow:
260+
languages:
261+
Python:
262+
versions:
263+
- sdk_version: 3
264+
github: python/example_code/bedrock-agent
265+
excerpts:
266+
- description: Prepare an Amazon Bedrock flow.
267+
snippet_tags:
268+
- python.example_code.bedrock-agent.prepare_flow
269+
services:
270+
bedrock-agent: {PrepareFlow}
271+
272+
bedrock-agent_UpdateFlow:
273+
languages:
274+
Python:
275+
versions:
276+
- sdk_version: 3
277+
github: python/example_code/bedrock-agent
278+
excerpts:
279+
- description: Update an Amazon Bedrock Flow.
280+
snippet_tags:
281+
- python.example_code.bedrock-agent.update_flow
282+
services:
283+
bedrock-agent: {UpdateFlow}
284+
285+
bedrock-agent_DeleteFlow:
286+
languages:
287+
Python:
288+
versions:
289+
- sdk_version: 3
290+
github: python/example_code/bedrock-agent
291+
excerpts:
292+
- description: Delete an Amazon Bedrock flow.
293+
snippet_tags:
294+
- python.example_code.bedrock-agent.delete_flow
295+
services:
296+
bedrock-agent: {DeleteFlow}
297+
298+
bedrock-agent_GetFlow:
299+
languages:
300+
Python:
301+
versions:
302+
- sdk_version: 3
303+
github: python/example_code/bedrock-agent
304+
excerpts:
305+
- description: Get an Amazon Bedrock flow.
306+
snippet_tags:
307+
- python.example_code.bedrock-agent.get_flow
308+
services:
309+
bedrock-agent: {GetFlow}
310+
311+
bedrock-agent_ListFlows:
312+
languages:
313+
Python:
314+
versions:
315+
- sdk_version: 3
316+
github: python/example_code/bedrock-agent
317+
excerpts:
318+
- description: List Amazon Bedrock flows.
319+
snippet_tags:
320+
- python.example_code.bedrock-agent.list_flows
321+
322+
services:
323+
bedrock-agent: {ListFlows}
324+
325+
bedrock-agent_CreateFlowAlias:
326+
languages:
327+
Python:
328+
versions:
329+
- sdk_version: 3
330+
github: python/example_code/bedrock-agent
331+
excerpts:
332+
- description: Create an alias for an Amazon Bedrock flow.
333+
snippet_tags:
334+
- python.example_code.bedrock-agent.create_flow_alias
335+
336+
services:
337+
bedrock-agent: {CreateFlowAlias}
338+
339+
bedrock-agent_UpdateFlowAlias:
340+
languages:
341+
Python:
342+
versions:
343+
- sdk_version: 3
344+
github: python/example_code/bedrock-agent
345+
excerpts:
346+
- description: Update an alias for an Amazon Bedrock flow.
347+
snippet_tags:
348+
- python.example_code.bedrock-agent.update_flow_alias
349+
350+
services:
351+
bedrock-agent: {UpdateFlowAlias}
352+
353+
bedrock-agent_DeleteFlowAlias:
354+
languages:
355+
Python:
356+
versions:
357+
- sdk_version: 3
358+
github: python/example_code/bedrock-agent
359+
excerpts:
360+
- description: Delete an alias for an Amazon Bedrock flow.
361+
snippet_tags:
362+
- python.example_code.bedrock-agent.delete_flow_alias
363+
364+
services:
365+
bedrock-agent: {DeleteFlowAlias}
366+
367+
bedrock-agent_ListFlowAliases:
368+
languages:
369+
Python:
370+
versions:
371+
- sdk_version: 3
372+
github: python/example_code/bedrock-agent
373+
excerpts:
374+
- description: List the aliases for an Amazon Bedrock flow.
375+
snippet_tags:
376+
- python.example_code.bedrock-agent.list_flow_aliases
377+
378+
services:
379+
bedrock-agent: {ListFlowAliases}
380+
381+
bedrock-agent_CreateFlowVersion:
382+
languages:
383+
Python:
384+
versions:
385+
- sdk_version: 3
386+
github: python/example_code/bedrock-agent
387+
excerpts:
388+
- description: Create a version of an Amazon Bedrock flow.
389+
snippet_tags:
390+
- python.example_code.bedrock-agent.create_flow_version
391+
392+
services:
393+
bedrock-agent: {CreateFlowVersion}
394+
395+
bedrock-agent_GetFlowVersion:
396+
languages:
397+
Python:
398+
versions:
399+
- sdk_version: 3
400+
github: python/example_code/bedrock-agent
401+
excerpts:
402+
- description: Get a version of an Amazon Bedrock flow.
403+
snippet_tags:
404+
- python.example_code.bedrock-agent.get_flow_version
405+
406+
services:
407+
bedrock-agent: {GetFlowVersion}
408+
409+
bedrock-agent_DeleteFlowVersion:
410+
languages:
411+
Python:
412+
versions:
413+
- sdk_version: 3
414+
github: python/example_code/bedrock-agent
415+
excerpts:
416+
- description: Delete a version of an Amazon Bedrock flow.
417+
snippet_tags:
418+
- python.example_code.bedrock-agent.delete_flow_version
419+
420+
services:
421+
bedrock-agent: {DeleteFlowVersion}
422+
423+
bedrock-agent_ListFlowVersions:
424+
languages:
425+
Python:
426+
versions:
427+
- sdk_version: 3
428+
github: python/example_code/bedrock-agent
429+
excerpts:
430+
- description: List the versions of an Amazon Bedrock flow.
431+
snippet_tags:
432+
- python.example_code.bedrock-agent.list_flow_versions
433+
434+
services:
435+
bedrock-agent: {ListFlowVersions}

.doc_gen/metadata/bedrock-runtime_metadata.yaml

Lines changed: 54 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ bedrock-runtime_Converse_Ai21LabsJurassic2:
7272
- description: Send a text message to AI21 Labs Jurassic-2, using Bedrock's Converse API.
7373
snippet_tags:
7474
- python.example_code.bedrock-runtime.Converse_Ai21LabsJurassic2
75-
JavaScript:
76-
versions:
77-
- sdk_version: 3
78-
github: javascriptv3/example_code/bedrock-runtime
79-
excerpts:
80-
- description: Send a text message to AI21 Labs Jurassic-2, using Bedrock's Converse API.
81-
snippet_tags:
82-
- javascript.v3.bedrock-runtime.Converse_Ai21LabsJurassic2
8375
services:
8476
bedrock-runtime: {Converse}
8577

@@ -108,6 +100,10 @@ bedrock-runtime_Converse_AmazonNovaText:
108100
- description: Send a text message to Amazon Nova, using Bedrock's Converse API.
109101
snippet_tags:
110102
- javascript.v3.bedrock-runtime.Converse_AmazonNovaText
103+
- description: Send a conversation of messages to Amazon Nova using Bedrock's Converse API with a tool configuration.
104+
genai: some
105+
snippet_tags:
106+
- Bedrock.ConverseTool.javascriptv3.SendConverseRequest
111107
Kotlin:
112108
versions:
113109
- sdk_version: 1
@@ -189,6 +185,22 @@ bedrock-runtime_Scenario_ToolUse:
189185
synopsis: "build a typical interaction between an application, a generative AI model, and connected tools or APIs to mediate interactions between the AI and the outside world. It uses the example of connecting an external weather API to the AI model so it can provide real-time weather information based on user input."
190186
category: Scenarios
191187
languages:
188+
Java:
189+
versions:
190+
- sdk_version: 2
191+
github: javav2/example_code/bedrock-runtime
192+
excerpts:
193+
- description: "The primary execution of the scenario flow. This scenario orchestrates the conversation between the user, the &BR; Converse API, and a weather tool."
194+
snippet_tags:
195+
- bedrock.converseTool.javav2.scenario
196+
- description: "The weather tool used by the demo. This file defines the tool specification and implements the logic to retrieve weather data using from the Open-Meteo API."
197+
genai: some
198+
snippet_tags:
199+
- bedrock.converseTool.javav2.weathertool
200+
- description: "The Converse API action with a tool configuration."
201+
genai: some
202+
snippet_tags:
203+
- bedrockruntime.java2.converse.main
192204
.NET:
193205
versions:
194206
- sdk_version: 3
@@ -206,6 +218,15 @@ bedrock-runtime_Scenario_ToolUse:
206218
genai: some
207219
snippet_tags:
208220
- Bedrock.ConverseTool.dotnetv3.SendConverseRequest
221+
JavaScript:
222+
versions:
223+
- sdk_version: 3
224+
github: javascriptv3/example_code/bedrock-runtime/scenarios/converse_tool_scenario
225+
excerpts:
226+
- description: "The primary execution of the scenario flow. This scenario orchestrates the conversation between the user, the &BR; Converse API, and a weather tool."
227+
genai: some
228+
snippet_tags:
229+
- Bedrock.ConverseTool.javascriptv3.Scenario
209230
Python:
210231
versions:
211232
- sdk_version: 3
@@ -739,14 +760,6 @@ bedrock-runtime_InvokeModel_Ai21LabsJurassic2:
739760
snippet_tags:
740761
- gov2.bedrock-runtime.InvokeModelWrapper.struct
741762
- gov2.bedrock-runtime.InvokeJurassic2
742-
JavaScript:
743-
versions:
744-
- sdk_version: 3
745-
github: javascriptv3/example_code/bedrock-runtime
746-
excerpts:
747-
- description: Use the Invoke Model API to send a text message.
748-
snippet_files:
749-
- javascriptv3/example_code/bedrock-runtime/models/ai21LabsJurassic2/invoke_model.js
750763
PHP:
751764
versions:
752765
- sdk_version: 3
@@ -1484,6 +1497,22 @@ bedrock-runtime_Scenario_ToolUseDemo_AmazonNova:
14841497
synopsis: "build a typical interaction between an application, a generative AI model, and connected tools or APIs to mediate interactions between the AI and the outside world. It uses the example of connecting an external weather API to the AI model so it can provide real-time weather information based on user input."
14851498
category: Amazon Nova
14861499
languages:
1500+
Java:
1501+
versions:
1502+
- sdk_version: 2
1503+
github: javav2/example_code/bedrock-runtime
1504+
excerpts:
1505+
- description: "The primary execution of the scenario flow. This scenario orchestrates the conversation between the user, the &BR; Converse API, and a weather tool."
1506+
snippet_tags:
1507+
- bedrock.converseTool.javav2.scenario
1508+
- description: "The weather tool used by the demo. This file defines the tool specification and implements the logic to retrieve weather data using from the Open-Meteo API."
1509+
genai: some
1510+
snippet_tags:
1511+
- bedrock.converseTool.javav2.weathertool
1512+
- description: "The Converse API action with a tool configuration."
1513+
genai: some
1514+
snippet_tags:
1515+
- bedrockruntime.java2.converse.main
14871516
.NET:
14881517
versions:
14891518
- sdk_version: 3
@@ -1501,6 +1530,15 @@ bedrock-runtime_Scenario_ToolUseDemo_AmazonNova:
15011530
genai: some
15021531
snippet_tags:
15031532
- Bedrock.ConverseTool.dotnetv3.SendConverseRequest
1533+
JavaScript:
1534+
versions:
1535+
- sdk_version: 3
1536+
github: javascriptv3/example_code/bedrock-runtime/scenarios/converse_tool_scenario
1537+
excerpts:
1538+
- description: "The primary execution of the scenario flow. This scenario orchestrates the conversation between the user, the &BR; Converse API, and a weather tool."
1539+
genai: some
1540+
snippet_tags:
1541+
- Bedrock.ConverseTool.javascriptv3.Scenario
15041542
services:
15051543
bedrock-runtime: {Converse}
15061544

0 commit comments

Comments
 (0)