{"id":25688781,"url":"https://github.com/micaelleos/chatbot-backend","last_synced_at":"2026-05-01T21:02:50.581Z","repository":{"id":277892409,"uuid":"825094734","full_name":"micaelleos/Chatbot-backend","owner":"micaelleos","description":"Backend de Chatbot Genérico com LangChain e AWS Lambda: Este repositório contém o backend de um chatbot genérico utilizando LangChain, FastAPI e AWS Lambda. O projeto usa Docker para containerização e DynamoDB para armazenamento de dados e histórico de conversas. É uma base escalável e de fácil deploy para criar chatbots personalizados e serverless","archived":false,"fork":false,"pushed_at":"2025-03-28T07:25:38.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T08:28:40.634Z","etag":null,"topics":["chatbot","dynamodb","fastapi","lambda-functions","langchain"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micaelleos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-06T18:53:59.000Z","updated_at":"2025-03-28T07:25:41.000Z","dependencies_parsed_at":"2025-03-28T08:23:58.051Z","dependency_job_id":"89781cc2-3e9f-4663-8c49-c6598724f774","html_url":"https://github.com/micaelleos/Chatbot-backend","commit_stats":null,"previous_names":["micaelleos/chatbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/micaelleos/Chatbot-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micaelleos%2FChatbot-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micaelleos%2FChatbot-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micaelleos%2FChatbot-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micaelleos%2FChatbot-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micaelleos","download_url":"https://codeload.github.com/micaelleos/Chatbot-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micaelleos%2FChatbot-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","dynamodb","fastapi","lambda-functions","langchain"],"created_at":"2025-02-24T21:05:56.721Z","updated_at":"2026-05-01T21:02:50.574Z","avatar_url":"https://github.com/micaelleos.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Chatbot-Backend**\n---\n\n### **Overview**  \n\nThis repository contains the implementation of a **generic chatbot backend** using the **LangChain** framework for conversation management, **FastAPI** for building fast and scalable APIs, and **Docker** for project containerization. The chatbot is configured to run as **AWS Lambda functions**, with integration into **DynamoDB** for data persistence and interaction history storage.  \n\n---\n\n### **Technologies Used**  \n\n- **LangChain**: A framework for building conversational agents based on language models.  \n- **FastAPI**: A fast and efficient framework for creating RESTful APIs.  \n- **Docker**: Containerization of the backend for easy deployment and execution.  \n- **AWS Lambda**: Serverless execution to scale functions without managing servers.  \n- **DynamoDB**: AWS NoSQL database for storing chatbot data and history.  \n\n---\n\n### **Features**  \n\n- **AWS Lambda Integration**: The chatbot runs as Lambda functions, ensuring scalability and low operational costs.  \n- **DynamoDB Storage**: Stores and retrieves chatbot interaction data, with easy expansion for storing histories, user preferences, and more.  \n- **Generic Chatbot Model**: The chatbot can be customized for various use cases, including customer support, personal assistants, and more.  \n\n---\n\n### **Repository Structure**  \n\n- **scripts/**: Contains the main backend code, including the FastAPI implementation and LangChain integration.  \n- **Dockerfile**: Configuration file to build the project's Docker image.  \n- **requirements.txt**: List of dependencies required to run the project locally.  \n- **Makefile**: Deployment configurations for Lambda functions and AWS integration.  \n- **.env**: Environment variables file (not included in the repository for security reasons).  \n\n---\n\n### **How to Run the Project**  \n\n#### 1. **Clone the Repository**  \n\nClone the repository to your local machine:  \n\n```bash\ngit clone https://github.com/micaelleos/chatbot.git\ncd chatbot\n```  \n\n#### 2. **Install Dependencies**  \n\nInstall the required dependencies:  \n\n```bash\npip install -r requirements.txt\n```  \n\n#### 3. **Run Locally with Docker**  \n\nThe project is configured to run inside a Docker container. To start the backend locally, use the following commands:  \n\n```bash\ndocker build -t chatbot .\ndocker run -p 8000:8000 chatbot\n```  \nor run:  \n\n```bash\nuvicorn api:app --reload\n```  \n\nThe FastAPI API will be available at `http://localhost:8000`.  \n\n#### 4. **Deploy on AWS Lambda**  \n\nTo deploy on AWS Lambda, use the **Serverless Framework** by following these steps:  \n\n- Configure your AWS credentials (`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`).  \n- Install the **Serverless Framework** globally:  \n\n  ```bash\n  npm install -g serverless\n  ```  \n\n- Deploy using the command:  \n\n  ```bash\n  serverless deploy\n  ```  \n\nThis will deploy the backend to AWS Lambda functions.  \n\n---\n\n### **How It Works**  \n\n1. **Chatbot Interaction**: The chatbot receives user queries via the FastAPI-based API, which is managed by Lambda functions.  \n2. **Processing with LangChain**: LangChain is used to handle conversation logic, interacting with the language model to provide context-based responses.  \n3. **Storage in DynamoDB**: Conversation history and additional data can be stored in DynamoDB for future queries.  \n\n---\n\n### **Contributing**  \n\nIf you want to contribute to this project, follow these steps:  \n\n1. Fork this repository.  \n2. Create a new branch (`git checkout -b my-new-feature`).  \n3. Make your changes.  \n4. Submit a pull request with a detailed description of the modifications.  \n\n---\n\n### **License**  \n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.  \n\n---\n\n### **Contact**  \n\nIf you have any questions or suggestions, feel free to open an *issue* or contact me directly via email: [micaelle.osouza@gmail.com].  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicaelleos%2Fchatbot-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicaelleos%2Fchatbot-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicaelleos%2Fchatbot-backend/lists"}