{"id":13585037,"url":"https://github.com/ssheng/BentoChain","last_synced_at":"2025-04-07T06:32:20.015Z","repository":{"id":152699523,"uuid":"623684005","full_name":"ssheng/BentoChain","owner":"ssheng","description":"A voice-enabled chatbot application built using of 🦜️🔗 LangChain, text-to-speech, and speech-to-text models from  🤗 Hugging Face, and 🍱 BentoML.","archived":false,"fork":false,"pushed_at":"2023-11-13T10:51:40.000Z","size":4854,"stargazers_count":192,"open_issues_count":3,"forks_count":24,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T11:12:51.700Z","etag":null,"topics":["ai","chatbot","langchain","llm","speech-to-text","text-to-speech"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ssheng.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}},"created_at":"2023-04-04T21:41:33.000Z","updated_at":"2025-03-05T03:07:55.000Z","dependencies_parsed_at":"2024-01-06T20:55:16.164Z","dependency_job_id":null,"html_url":"https://github.com/ssheng/BentoChain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssheng%2FBentoChain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssheng%2FBentoChain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssheng%2FBentoChain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssheng%2FBentoChain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssheng","download_url":"https://codeload.github.com/ssheng/BentoChain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247607294,"owners_count":20965942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ai","chatbot","langchain","llm","speech-to-text","text-to-speech"],"created_at":"2024-08-01T15:04:42.103Z","updated_at":"2025-04-07T06:32:19.997Z","avatar_url":"https://github.com/ssheng.png","language":"Python","funding_links":[],"categories":["Python","Tools","Building","工具"],"sub_categories":["Services","LLM Models","服务"],"readme":"# 🍱🔗 BentoChain - LangChain Deployment on BentoML \n\nReference: Medium [post](https://medium.com/@ahmedbesbes/deploy-a-voice-based-chatbot-with-bentoml-langchain-and-gradio-7f25af3e45df)\n\n----\n\n\nBentoChain is a 🦜️🔗 [LangChain](https://github.com/hwchase17/langchain) deployment example using 🍱 [BentoML](https://github.com/bentoml/BentoML) inspired by [langchain-gradio-template](https://github.com/hwchase17/langchain-gradio-template). This example demonstrates how to create a voice chatbot using the OpenAI API, Transformers speech models, Gradio, and BentoML. The chatbot takes input from a microphone, which is then converted into text using a speech recognition model. \n\nThe chatbot responds to the user's input with text, which can be played back to the user using a text-to-speech model.\n\n## Demo\n\nhttps://user-images.githubusercontent.com/6267065/235378103-54dd7c5b-16d1-4be7-b44a-fedde094c516.mp4\n\n## Why deploy LangChain applications with BentoML?\n\n🐳 Containerizes LangChain applications as standard OCI images.\n\n🎱 Generates OpenAPI and gRPC endpoints automatically.\n\n☁️ Deploys models as microservices running on the most optimal hardware and scaling independently.\n\n## Instructions\n\nInstall Python dependencies.\n\n```sh\npoetry install\npoetry shell\n```\n\nDownload and save speech recognition and text-to-speech models.\n\n```sh\npython train.py\n```\n\nStart the application locally.\n\n```sh\nbentoml serve\n```\n\nVisit http://0.0.0.0:3000 for an OpenAPI Swagger page and http://0.0.0.0:3000/chatbot for a Gradio UI for the chatbot. Note that the microphone input functionality may not be functional on browsers like Google Chrome because the endpoint is not HTTPS. However, the microphone input will become functional\nafter deploying to BentoCloud.\n\n\nBuild application into a distributable Bento artifact.\n\n```sh\nbentoml build\n\nBuilding BentoML service \"voicegpt:vmjw2vucbodwkcvj\" from build context \"/Users/ssheng/github/BentoChain\".\nPacking model \"speecht5_tts_processor:7pjfnkucbgjzycvj\"\nPacking model \"speecht5_tts_vocoder:7suthpucbgjzycvj\"\nPacking model \"whisper_processor:7s6wbnecbgjzycvj\"\nPacking model \"whisper_model:7td75iucbgjzycvj\"\nPacking model \"speecht5_tts_model:7pkfc3ecbgjzycvj\"\n\n██████╗░███████╗███╗░░██╗████████╗░█████╗░███╗░░░███╗██╗░░░░░\n██╔══██╗██╔════╝████╗░██║╚══██╔══╝██╔══██╗████╗░████║██║░░░░░\n██████╦╝█████╗░░██╔██╗██║░░░██║░░░██║░░██║██╔████╔██║██║░░░░░\n██╔══██╗██╔══╝░░██║╚████║░░░██║░░░██║░░██║██║╚██╔╝██║██║░░░░░\n██████╦╝███████╗██║░╚███║░░░██║░░░╚█████╔╝██║░╚═╝░██║███████╗\n╚═════╝░╚══════╝╚═╝░░╚══╝░░░╚═╝░░░░╚════╝░╚═╝░░░░░╚═╝╚══════╝\n\nSuccessfully built Bento(tag=\"voicegpt:vmjw2vucbodwkcvj\").\n\nPossible next steps:\n\n * Containerize your Bento with `bentoml containerize`:\n    $ bentoml containerize voicegpt:vmjw2vucbodwkcvj\n\n * Push to BentoCloud with `bentoml push`:\n    $ bentoml push voicegpt:vmjw2vucbodwkcvj\n```\n\n# Production Deployment\n\nBentoML provides a number of [deployment options](https://docs.bentoml.com/en/latest/concepts/deploy.html).\nThe easiest way to set up a production-ready endpoint of your text embedding service is via BentoCloud,\nthe serverless cloud platform built for BentoML, by the BentoML team.\n\nNext steps:\n\n1. Sign up for a BentoCloud account [here](https://www.bentoml.com/).\n2. Get an API Token, see instructions [here](https://docs.bentoml.com/en/latest/bentocloud/getting-started/ship.html#acquiring-an-api-token).\n3. Push your Bento to BentoCloud:\n   \n   ```sh\n   bentoml push voicegpt:vmjw2vucbodwkcvj\n   ```\n\n4. Deploy via Web UI, see [Deploying on BentoCloud](https://docs.bentoml.com/en/latest/bentocloud/getting-started/ship.html#deploying-your-bento)\n\n\nAnd and push to BentoCloud.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssheng%2FBentoChain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssheng%2FBentoChain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssheng%2FBentoChain/lists"}