Skip to content

Simple Example in Ruby to use Bedrock's invoke_model and converse from AWS SDK

Notifications You must be signed in to change notification settings

vdesaintpern/aws-bedrock-ruby-example

Repository files navigation

AI Model Invocation and Conversation Tests

This repository contains test scripts for invoking multi-modal Claude 3.5 model in Bedrock and conducting conversations. The scripts are written in Ruby and demonstrate various approaches to interacting with AI models.

Contents

Model Invocation

  • test_invoke_model.rb: Tests invoking an AI model using a specific API or library.

    • Demonstrates how to send a prompt to the model and process the response.
    • Includes error handling and basic result validation.
  • test-invoke_model.rb: An alternative approach to model invocation.

    • Uses a different method or library for model interaction.
    • Showcases parameter tuning and response formatting.

Conversation Tests

  • test_converse.rb: Simulates a multi-turn conversation with an AI model.

    • Implements a basic conversation loop with user input and model responses.
    • Demonstrates how to maintain context across multiple exchanges.
  • test-conversation.rb: Another example of conversation testing.

    • Uses a different conversation structure or API.
    • Includes features like conversation history management and topic tracking.

Usage

To run the tests, make sure you have Ruby installed on your system. Then, you can execute each test script individually:

About

Simple Example in Ruby to use Bedrock's invoke_model and converse from AWS SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages