Text Generation (amazon.titan-tg1-large)

POST https://bedrock-runtime.{{AWS_Region}}.amazonaws.com/model/:model_identifier/invoke

Request Body

{"inputText"=>"Tell a story of two dogs", "textGenerationConfig"=>{"maxTokenCount"=>4096, "temperature"=>0, "topP"=>0.9}}

RESPONSES

status: OK

{"inputTextTokenCount":6,"results":[{"tokenCount":237,"outputText":"\nOnce upon a time, there were two dogs named Max and Bella. Max was a playful and energetic Golden Retriever, while Bella was a calm and gentle German Shepherd. They were the best of friends and loved to play together every day.\n\nOne day, while they were out for a walk, they came across a lost little girl. She was crying and scared, and Max and Bella didn't hesitate to approach her. They licked her face and wagged their tails, trying to comfort her.\n\nThe little girl was grateful to Max and Bella for their help. She told them that she had gotten lost while playing in the park and didn't know how to get back home. Max and Bella knew exactly where her house was and led the way, barking excitedly as they went.\n\nWhen they arrived at the little girl's house, her parents were overjoyed to see her safe and sound. They thanked Max and Bella for their kindness and generosity. From that day on, Max and Bella became known as the neighborhood's heroes. They continued to play together every day, but now they also looked out for each other and anyone else in need.","completionReason":"FINISH"}]}