{"id":17789521,"url":"https://github.com/benderscript/sharebotai","last_synced_at":"2025-06-21T01:37:57.589Z","repository":{"id":212462631,"uuid":"731015340","full_name":"BenderScript/ShareBotAI","owner":"BenderScript","description":"A RAG Chatbot for Sharepoint Deployments using Langchain and OpenAI","archived":false,"fork":false,"pushed_at":"2024-01-11T01:08:37.000Z","size":27,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T16:28:50.516Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BenderScript.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}},"created_at":"2023-12-13T07:08:30.000Z","updated_at":"2024-08-29T13:51:47.000Z","dependencies_parsed_at":"2023-12-22T04:10:24.109Z","dependency_job_id":null,"html_url":"https://github.com/BenderScript/ShareBotAI","commit_stats":null,"previous_names":["benderscript/sharebotai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2FShareBotAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2FShareBotAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2FShareBotAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2FShareBotAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenderScript","download_url":"https://codeload.github.com/BenderScript/ShareBotAI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246735363,"owners_count":20825224,"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-10-27T10:32:59.899Z","updated_at":"2025-04-02T00:45:42.995Z","avatar_url":"https://github.com/BenderScript.png","language":"Python","readme":"# GenAI Sharepoint RAG Chatbot\n\n**Objective**: The primary goal of this demo was to showcase a RAG Chatbot utilizing data from a Sharepoint folder.\n\n**Process Overview**:\n1. **Connection to Sharepoint**: The system establishes a connection to a specific Sharepoint folder.\n2. **Data Acquisition**: It downloads all the files contained within the folder.\n3. **Data Processing**: The files are then processed differently based on their type. For instance, Word documents, PowerPoint presentations, and CSV files each have a unique processing method. The appropriate GenAI chunker \u0026 splitter is utilized for each file type.\n4. **Video File Handling**: In the case of video files (MP4), the system extracts the audio, breaks it down into manageable parts, and uses OpenAI for transcription.\n5. **Data Storage**: All processed information is stored in a VectorDB.\n6. **Chatbot Creation**: Utilizing this data, a chatbot is created based on GPT-4 that can answer questions derived from the information in these files.\n\n# How to Run\n\n## .env file\n\nCreate a `.env` file with the following information:\n\n```bash\nOPENAI_API_KEY=\u003cyour open ai key\u003e\nOPENAI_API_TEMPERATURE=0.6\nOPENAI_API_MODEL_NAME=gpt-4\nOFFICE365_CLIENT_ID=\u003cclient id\u003e\nOFFICE365_CLIENT_SECRET=\u003cclient secret\u003e\nSHAREPOINT_SITE_URL=https://example.sharepoint.com/sites/myside\nSHAREPOINT_FOLDER=Shared Documents/Engineering/genai\n```\n\n## Installing Dependencies\n\n```bash\npip3 install -r requirements.txt\n```\n\n## Running\n\nRunning `bootstrap.py` will open a browser tab with the streamlit interface. \n\n```bash\npython3 bootstrap.py\n```\n\n# Areas for Improvement\n\nWhile the demo was successful, there are opportunities for enhancement. One significant aspect is the preparation of documents before processing. Encouraging users to provide more detailed information about the documents or leveraging GPT-4 to summarize the text could greatly enhance the chatbot's ability to provide insightful responses.\n\n# How to connect to SharePoint Online and SharePoint 2013 2016 2019 on premises with app principal\n\nhttps://github.com/vgrem/Office365-REST-Python-Client/wiki/How-to-connect-to-SharePoint-Online-and-and-SharePoint-2013-2016-2019-on-premises--with-app-principal\n\n# Using Streamlit with Self-Signed SSL Certificate (Optional)\n\nhttps://docs.streamlit.io/library/advanced-features/https-support\n\n\n# Generating a Self-Signed SSL Certificate for Localhost on MacOS\n\nThis guide provides steps to generate a self-signed SSL certificate specifically for `https://localhost:8501` on MacOS, using OpenSSL.\n\n## Prerequisites\n\n- Ensure that OpenSSL is installed on your system. If not, you can install it using Homebrew.\n\n## Instructions\n\n### Step 1: Open Terminal\n\nOpen the Terminal application, which can be found in the Applications under Utilities, or searched for using Spotlight.\n\n### Step 2: Check for OpenSSL\n\nCheck if OpenSSL is installed by typing the following command in Terminal:\n\n```bash\nopenssl version\n```\n\nIf it's not installed, install it using Homebrew:\n\n```bash\nbrew install openssl\n```\n\n### Step 3: Create a Private Key\n\nGenerate a private key with:\n\n```bash\nopenssl genrsa -out localhost.key 2048\n```\n\n### Step 4: Create a Certificate Signing Request (CSR)\n\nGenerate a CSR using the private key:\n\n```bash\nopenssl req -new -key localhost.key -out localhost.csr\n```\n\nWhen prompted for the \"Common Name\" (CN), enter `localhost`.\n\n### Step 5: Create a Configuration File\n\nCreate a file named `localhost.conf` with the following content:\n\n```\n[req]\ndistinguished_name = req_distinguished_name\nreq_extensions = v3_req\n\n[req_distinguished_name]\n\n[v3_req]\nbasicConstraints = CA:FALSE\nkeyUsage = nonRepudiation, digitalSignature, keyEncipherment\nsubjectAltName = @alt_names\n\n[alt_names]\nDNS.1 = localhost\n```\n\n### Step 6: Generate the Self-Signed Certificate\n\nGenerate the certificate using your CSR, private key, and the configuration file:\n\n```bash\nopenssl x509 -req -days 365 -in localhost.csr -signkey localhost.key -extfile localhost.conf -extensions v3_req -out localhost.crt\n```\n\n### Step 7: Verify the Certificate\n\nCheck your certificate:\n\n```bash\nopenssl x509 -text -noout -in localhost.crt\n```\n\n### Step 8: Using the Certificate\n\nThe `localhost.key` is your private key, and `localhost.crt` is your self-signed certificate. These can be used in your server configuration.\n\n## Note\n\nThis self-signed certificate is only suitable for local development and testing. For production environments, consider using a certificate from a trusted Certificate Authority.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenderscript%2Fsharebotai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenderscript%2Fsharebotai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenderscript%2Fsharebotai/lists"}