scenarios

package
v0.0.0-...-ba09527 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvokeModelsScenario

type InvokeModelsScenario struct {
	// contains filtered or unexported fields
}

InvokeModelsScenario demonstrates how to use the Amazon Bedrock Runtime client to invoke various foundation models for text and image generation

1. Generate text with Anthropic Claude 2 2. Generate text with AI21 Labs Jurassic-2 3. Generate text with Meta Llama 2 Chat 4. Generate text and asynchronously process the response stream with Anthropic Claude 2 5. Generate and image with the Amazon Titan image generation model 6. Generate text with Amazon Titan Text G1 Express model

func NewInvokeModelsScenario

func NewInvokeModelsScenario(sdkConfig aws.Config, questioner demotools.IQuestioner) InvokeModelsScenario

NewInvokeModelsScenario constructs an InvokeModelsScenario instance from a configuration. It uses the specified config to get a Bedrock Runtime client and create wrappers for the actions used in the scenario.

func (InvokeModelsScenario) InvokeClaude

func (scenario InvokeModelsScenario) InvokeClaude(prompt string)

func (InvokeModelsScenario) InvokeJurassic2

func (scenario InvokeModelsScenario) InvokeJurassic2(prompt string)

func (InvokeModelsScenario) InvokeLlama2

func (scenario InvokeModelsScenario) InvokeLlama2(prompt string)

func (InvokeModelsScenario) InvokeTitanImage

func (scenario InvokeModelsScenario) InvokeTitanImage(prompt string, seed int64)

func (InvokeModelsScenario) InvokeTitanText

func (scenario InvokeModelsScenario) InvokeTitanText(prompt string)

func (InvokeModelsScenario) InvokeWithResponseStream

func (scenario InvokeModelsScenario) InvokeWithResponseStream(prompt string)

func (InvokeModelsScenario) Run

func (scenario InvokeModelsScenario) Run()

Runs the interactive scenario.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL