

Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh [SDK AWS Doc](https://github.com/awsdocs/aws-doc-sdk-examples). GitHub 

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Contoh kode untuk Amazon Bedrock Runtime menggunakan AWS SDKs
<a name="bedrock-runtime_code_examples"></a>

Contoh kode berikut menunjukkan cara menggunakan Amazon Bedrock Runtime dengan kit pengembangan AWS perangkat lunak (SDK).

*Skenario* adalah contoh kode yang menunjukkan kepada Anda bagaimana menyelesaikan tugas tertentu dengan memanggil beberapa fungsi dalam layanan atau dikombinasikan dengan yang lain Layanan AWS.

**Sumber daya lainnya**
+  **[Panduan Pengguna Amazon Bedrock Runtime](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html)** — Informasi lebih lanjut tentang Amazon Bedrock Runtime.
+ **[Referensi API Amazon Bedrock Runtime](https://docs.aws.amazon.com/bedrock/latest/APIReference/welcome.html)** — Detail tentang semua tindakan Amazon Bedrock Runtime yang tersedia.
+ **[AWS Pusat Pengembang](https://aws.amazon.com/developer/code-examples/?awsf.sdk-code-examples-product=product%23bedrock)** - Contoh kode yang dapat Anda filter berdasarkan kategori atau pencarian teks lengkap.
+ **[AWS Contoh SDK](https://github.com/awsdocs/aws-doc-sdk-examples)** — GitHub repo dengan kode lengkap dalam bahasa pilihan. Termasuk instruksi untuk mengatur dan menjalankan kode.

**Contents**
+ [Hal-hal mendasar](bedrock-runtime_code_examples_basics.md)
  + [Halo Amazon Bedrock](bedrock-runtime_example_bedrock-runtime_Hello_section.md)
+ [Skenario](bedrock-runtime_code_examples_scenarios.md)
  + [Buat aplikasi taman bermain untuk berinteraksi dengan model yayasan Amazon Bedrock](bedrock-runtime_example_cross_FMPlayground_section.md)
  + [Membuat dan memanggil prompt terkelola](bedrock-runtime_example_bedrock-agent_GettingStartedWithBedrockPrompts_section.md)
  + [Hasilkan video dari petunjuk teks menggunakan Amazon Bedrock](bedrock-runtime_example_bedrock-runtime_Scenario_GenerateVideos_NovaReel_section.md)
  + [Gunakan beberapa model fondasi di Amazon Bedrock](bedrock-runtime_example_bedrock-runtime_Scenario_InvokeModels_section.md)
  + [Mengatur aplikasi AI generatif dengan Step Functions](bedrock-runtime_example_cross_ServerlessPromptChaining_section.md)
  + [Penggunaan alat dengan API Converse](bedrock-runtime_example_bedrock-runtime_Scenario_ToolUse_section.md)
+ [Amazon Nova](bedrock-runtime_code_examples_amazon_nova.md)
  + [Bercakap-cakap](bedrock-runtime_example_bedrock-runtime_Converse_AmazonNovaText_section.md)
  + [ConverseStream](bedrock-runtime_example_bedrock-runtime_ConverseStream_AmazonNovaText_section.md)
  + [Pemahaman dokumen](bedrock-runtime_example_bedrock-runtime_DocumentUnderstanding_AmazonNova_section.md)
  + [Skenario: Penggunaan alat dengan API Converse](bedrock-runtime_example_bedrock-runtime_Scenario_ToolUseDemo_AmazonNova_section.md)
+ [Kanvas Amazon Nova](bedrock-runtime_code_examples_amazon_nova_canvas.md)
  + [InvokeModel](bedrock-runtime_example_bedrock-runtime_InvokeModel_AmazonNovaImageGeneration_section.md)
+ [Amazon Nova Reel](bedrock-runtime_code_examples_amazon_nova_reel.md)
  + [T ext-to-video](bedrock-runtime_example_bedrock-runtime_Scenario_AmazonNova_TextToVideo_section.md)
+ [Generator Gambar Amazon Titan](bedrock-runtime_code_examples_amazon_titan_image_generator.md)
  + [InvokeModel](bedrock-runtime_example_bedrock-runtime_InvokeModel_TitanImageGenerator_section.md)
+ [Teks Amazon Titan](bedrock-runtime_code_examples_amazon_titan_text.md)
  + [InvokeModel](bedrock-runtime_example_bedrock-runtime_InvokeModel_TitanText_section.md)
+ [Embeddings Teks Amazon Titan](bedrock-runtime_code_examples_amazon_titan_text_embeddings.md)
  + [InvokeModel](bedrock-runtime_example_bedrock-runtime_InvokeModelWithResponseStream_TitanTextEmbeddings_section.md)
+ [Antropik Claude](bedrock-runtime_code_examples_anthropic_claude.md)
  + [Bercakap-cakap](bedrock-runtime_example_bedrock-runtime_Converse_AnthropicClaude_section.md)
  + [ConverseStream](bedrock-runtime_example_bedrock-runtime_ConverseStream_AnthropicClaude_section.md)
  + [Pemahaman dokumen](bedrock-runtime_example_bedrock-runtime_DocumentUnderstanding_AnthropicClaude_section.md)
  + [InvokeModel](bedrock-runtime_example_bedrock-runtime_InvokeModel_AnthropicClaude_section.md)
  + [InvokeModelWithResponseStream](bedrock-runtime_example_bedrock-runtime_InvokeModelWithResponseStream_AnthropicClaude_section.md)
  + [Penalaran](bedrock-runtime_example_bedrock-runtime_Converse_AnthropicClaudeReasoning_section.md)
  + [Penalaran dengan respons streaming](bedrock-runtime_example_bedrock-runtime_ConverseStream_AnthropicClaudeReasoning_section.md)
  + [Skenario: Penggunaan alat dengan API Converse](bedrock-runtime_example_bedrock-runtime_Scenario_ToolUseDemo_AnthropicClaude_section.md)
+ [Perintah Cohere](bedrock-runtime_code_examples_cohere_command.md)
  + [Bercakap-cakap](bedrock-runtime_example_bedrock-runtime_Converse_CohereCommand_section.md)
  + [ConverseStream](bedrock-runtime_example_bedrock-runtime_ConverseStream_CohereCommand_section.md)
  + [Pemahaman dokumen](bedrock-runtime_example_bedrock-runtime_DocumentUnderstanding_CohereCommand_section.md)
  + [InvokeModel: Perintah R dan R \+](bedrock-runtime_example_bedrock-runtime_InvokeModel_CohereCommandR_section.md)
  + [InvokeModelWithResponseStream: Perintah R dan R \+](bedrock-runtime_example_bedrock-runtime_InvokeModelWithResponseStream_CohereCommandR_section.md)
  + [Skenario: Penggunaan alat dengan API Converse](bedrock-runtime_example_bedrock-runtime_Scenario_ToolUseDemo_CohereCommand_section.md)
+ [DeepSeek](bedrock-runtime_code_examples_deepseek.md)
  + [Pemahaman dokumen](bedrock-runtime_example_bedrock-runtime_DocumentUnderstanding_DeepSeek_section.md)
+ [Meta Llama](bedrock-runtime_code_examples_meta_llama.md)
  + [Bercakap-cakap](bedrock-runtime_example_bedrock-runtime_Converse_MetaLlama_section.md)
  + [ConverseStream](bedrock-runtime_example_bedrock-runtime_ConverseStream_MetaLlama_section.md)
  + [Pemahaman dokumen](bedrock-runtime_example_bedrock-runtime_DocumentUnderstanding_MetaLlama_section.md)
  + [InvokeModel](bedrock-runtime_example_bedrock-runtime_InvokeModel_MetaLlama3_section.md)
  + [InvokeModelWithResponseStream](bedrock-runtime_example_bedrock-runtime_InvokeModelWithResponseStream_MetaLlama3_section.md)
+ [Mistral AI](bedrock-runtime_code_examples_mistral_ai.md)
  + [Bercakap-cakap](bedrock-runtime_example_bedrock-runtime_Converse_Mistral_section.md)
  + [ConverseStream](bedrock-runtime_example_bedrock-runtime_ConverseStream_Mistral_section.md)
  + [Pemahaman dokumen](bedrock-runtime_example_bedrock-runtime_DocumentUnderstanding_Mistral_section.md)
  + [InvokeModel](bedrock-runtime_example_bedrock-runtime_InvokeModel_MistralAi_section.md)
  + [InvokeModelWithResponseStream](bedrock-runtime_example_bedrock-runtime_InvokeModelWithResponseStream_MistralAi_section.md)
+ [Difusi Stabil](bedrock-runtime_code_examples_stable_diffusion.md)
  + [InvokeModel](bedrock-runtime_example_bedrock-runtime_InvokeModel_StableDiffusion_section.md)