{"id":21319451,"url":"https://github.com/zoom/zoom-cerebras-chatbot-sample","last_synced_at":"2025-03-15T22:27:41.117Z","repository":{"id":258272197,"uuid":"869220816","full_name":"zoom/zoom-cerebras-chatbot-sample","owner":"zoom","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-08T20:38:44.000Z","size":813,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T11:23:14.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zoom.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-10-07T23:35:58.000Z","updated_at":"2024-11-08T20:38:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"42c28ccd-7f68-436e-8fac-577bd4f26532","html_url":"https://github.com/zoom/zoom-cerebras-chatbot-sample","commit_stats":null,"previous_names":["zoom/zoom-cerebras-chatbot-sample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoom%2Fzoom-cerebras-chatbot-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoom%2Fzoom-cerebras-chatbot-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoom%2Fzoom-cerebras-chatbot-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoom%2Fzoom-cerebras-chatbot-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoom","download_url":"https://codeload.github.com/zoom/zoom-cerebras-chatbot-sample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243800302,"owners_count":20349989,"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":[],"created_at":"2024-11-21T19:41:57.398Z","updated_at":"2025-03-15T22:27:41.096Z","avatar_url":"https://github.com/zoom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zoom-Cerebras-Chatbot\n\nThis project integrates Cerebras' advanced language models with Zoom Team Chat, creating an intelligent chatbot that can assist users directly within their Zoom conversations. The bot leverages Cerebras' powerful and fast natural language processing capabilities to provide helpful responses to user queries on a wide range of topics.\n\n## What the Chatbot Does\n\n- Responds to user messages in Zoom Team Chat using Cerebras' language models.\n- Maintains conversation history for context-aware responses.\n- Can be used in direct messages or invoked in group chats and channels.\n- Provides helpful information, answers questions, assists with tasks, and engages in discussions on various topics with exceptional speed and accuracy.\n\n## Why Cerebras?\n\nCerebras Systems is a pioneer in accelerating artificial intelligence compute. Their language models, powered by the Cerebras Wafer-Scale Engine (WSE), offer several advantages:\n\n1. Unprecedented Speed: Cerebras' AI models can process and generate responses much faster than traditional systems, ensuring near-instantaneous interactions in Zoom chats.\n2. Advanced Language Understanding: The models excel at comprehending context and nuance, leading to more accurate and relevant responses.\n3. Efficient Scaling: Cerebras' architecture allows for efficient scaling of language models, enabling the use of more powerful models without significant performance trade-offs.\n4. Reduced Latency: The unique hardware design minimizes latency, crucial for real-time chat applications like this Zoom integration.\n\nBy leveraging Cerebras' technology, this chatbot provides Zoom users with a responsive, intelligent, and efficient AI assistant that enhances their communication and productivity.\n\n## Prerequisites\n\nBefore you can use this chatbot, you'll need the following:\n\n- Node.js (version 12 or later)\n- A Zoom account\n- A Cerebras API account\n\n## Setup\n\nFirst, clone the repository:\n\ngit clone https://github.com/zoom/zoom-cerebras-chatbot\n\ncd zoom-cerebras-chatbot\n\nNext, install the required Node.js packages:\n\nnpm install\n## Configuration\nYou need to set up your environment variables. Create a `.env` file in the project root and add the following variables:\n\n``` bash\nZOOM_CLIENT_ID=your_zoom_client_id\nZOOM_CLIENT_SECRET=your_zoom_client_secret\nZOOM_BOT_JID=your_zoom_bot_jid\nZOOM_WEBHOOK_SECRET_TOKEN=your_zoom_webhook_secret_token\nCEREBRAS_API_KEY=your_cerebras_api_key\nBOT_NOTIFICATION_URL=your_custom_endpoint ex: /cerebras\n\n```\n\nTo obtain these variables:\n\n- For Zoom variables (ZOOM_CLIENT_ID, ZOOM_CLIENT_SECRET, ZOOM_BOT_JID, ZOOM_WEBHOOK_SECRET_TOKEN, ZOOM_VERIFICATION_CODE),\n  refer to the [Zoom App Marketplace guide on creating a Team Chat app](https://developers.zoom.us/docs/team-chat-apps/create/).\n\n- For the CEREBRAS_API_KEY, you can obtain it from your Cerebras account dashboard.\n\n## Running the Application\n\nTo start the application:\n\n\nnode index.js\n\nThe application will run on `http://localhost:4000/` by default, but you can set a different port by changing the `PORT` variable in your `.env` file. The custom endpoint for bot notifications is defined by the `BOT_NOTIFICATION_URL` variable.\n\n## Usage\n\n1. In your Zoom Team Chat App's Credentials section, go to the Local Test or Submit page depending on which environment you are using (Development or Production), and click \"Add\".\n\n2. After authorizing, you will be redirected to Zoom Team Chat and see a message from the chatbot:\n\n   \"Greetings from Zoom-Cerebras-Chatbot!\"\n\n3. To use the bot, type a message in the chat like this:\n\n   \"Hi My name is Ojus and I want you to write a poem on zoom developer platform\"\n\n4. The response from the bot will look like this:\n\n   [AI-generated poem about Zoom Developer Platform]\n\n   ![Query Example](/images/image.png)\n\n5. The bot remembers context from previous messages:\n\n   ![Context Example](/images/image%202.png)\n\n6. If you want to use the bot in a chat or a channel, you can invoke the bot with a \"/\" command:\n   Example:\n   `/cerebras-bot Tell me about the history of San Francisco`\n\n## Key Functions\n\nOur codebase includes several important functions that drive the chatbot's functionality:\n\n- `handleZoomWebhook` (src/zoomWebhookHandler.js): This function processes incoming webhook events from Zoom. It handles different event types, including bot notifications, installations, and uninstallations. For message events, it triggers the Cerebras API call.\n\n- `callCerebrasAPI` (src/cerebras.js): This function is responsible for interacting with the Cerebras API. It prepares the conversation history, sends the user's message to Cerebras, and processes the AI-generated response. It also manages the conversation history for context-aware responses.\n\n- `getChatbotToken` (src/zoomAuth.js): This function obtains an authentication token from Zoom, which is necessary for sending messages back to the Zoom chat. It uses the client credentials flow for secure authentication.\n\n- `sendChatToZoom` (src/sendChatbotMessage.js): After receiving a response from Cerebras, this function sends the AI-generated message back to the Zoom chat. It formats the message and uses the Zoom API to deliver the response to the correct chat or channel.\n\nThese functions work together to create a seamless flow from receiving a user message in Zoom, processing it with Cerebras' AI, and sending the response back to the user in Zoom Team Chat.\n\n\n## License\n\nThis project is licensed under the MIT License:\n\nMIT License\n\nCopyright (c)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoom%2Fzoom-cerebras-chatbot-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoom%2Fzoom-cerebras-chatbot-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoom%2Fzoom-cerebras-chatbot-sample/lists"}