Chat Playground com AWS Bedrock e Streamlit
Shubhamraut01/chatbot-using-aws-bedrock
Interface Streamlit para conversar com Claude via Amazon Bedrock
Ver no GitHubAplicação de chat em tempo real construída com Streamlit que integra o modelo Claude da Anthropic via Amazon Bedrock. Permite interação direta com IA através de uma interface web simples, ideal para prototipagem e testes de modelos generativos na AWS.
Instalação
npx convez-ai Shubhamraut01/chatbot-using-aws-bedrock1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Prototipagem rápida de aplicações conversacionais
- Testes interativos com modelos Claude na AWS
- Demonstração de integração Bedrock em aplicações Python
Veredito

Projeto educacional sólido que demonstra a integração básica entre Streamlit e AWS Bedrock. Funciona bem para prototipagem, mas carece de tratamento de erros robusto, cache de conversas e gerenciamento de contexto para uso produtivo.
README
A tradução para o português deste README ainda está na fila.
Chat Playground using Amazon Bedrock and Streamlit
This project is a simple chat application built using Streamlit that interfaces with Amazon Bedrock's Anthropic Claude model to generate responses to user input. The application allows users to type a message and receive a generated response using the power of AI.
Features
- Real-time Chat: Interact with an AI model to generate responses based on user input.
- Streamlit Interface: Provides an easy-to-use web interface for inputting text and viewing responses.
- Amazon Bedrock Integration: Leverages AWS's Bedrock service to invoke the Claude model for text generation.
Prerequisites
Before you begin, ensure you have met the following requirements:
- AWS Account: You need an AWS account with access to the Bedrock service.
- AWS CLI Configured: Ensure that your AWS CLI is configured with the appropriate credentials and region (e.g.,
us-east-1). - Python 3.x: This project is built with Python, so you'll need Python installed on your system.
- Streamlit: Install Streamlit using pip:
pip install streamlit
Installation
-
Clone the Repository:
git clone <repository_url> cd <repository_directory> -
Install Dependencies: Install the required Python packages:
pip install -r requirements.txt -
Configure AWS Credentials: Ensure your AWS credentials are configured in your environment. You can do this by running:
aws configure
Usage
To run the application, execute the following command:
streamlit run app.py
This will launch a local web server, and you can interact with the chat interface in your browser.
Code Explanation
- generate_response(prompt): This function takes a user's input (
prompt) and sends a request to the Anthropic Claude model using Amazon Bedrock. It returns the model's response text. - Streamlit Interface:
- The user input is captured using
st.text_input. - Upon pressing the "Send" button, the
generate_responsefunction is invoked, and the generated response is displayed.
- The user input is captured using
Error Handling
The function includes a try-except block to catch and print any errors during the API call to Bedrock.
Future Enhancements
- Error Logging: Implement better error logging and handling.
- Model Selection: Allow users to choose from different models available in Bedrock.
- Styling Improvements: Enhance the UI/UX of the Streamlit app.
License
This project is licensed under the MIT License. See the LICENSE file for details.