{"id":18410978,"url":"https://github.com/analyticsinmotion/integrate-palm-into-word","last_synced_at":"2025-07-10T00:08:58.739Z","repository":{"id":168901310,"uuid":"643767592","full_name":"analyticsinmotion/integrate-palm-into-word","owner":"analyticsinmotion","description":"How to use Google's PaLM 2 language model in Microsoft Word.","archived":false,"fork":false,"pushed_at":"2023-10-23T06:00:03.000Z","size":1865,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T23:20:23.594Z","etag":null,"topics":["bison-text","google-bard","google-palm","large-language-model","large-language-models","llm","microsoft-word","palm","palm-2","palm2","palm2-in-ms-word","pathway-langugae-model","text-completion","vba-macros"],"latest_commit_sha":null,"homepage":"https://www.analyticsinmotion.com","language":"VBA","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/analyticsinmotion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-22T05:49:44.000Z","updated_at":"2024-08-13T05:42:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"d47a24c3-9aa4-42b0-ab8c-d51a1a7e5a53","html_url":"https://github.com/analyticsinmotion/integrate-palm-into-word","commit_stats":null,"previous_names":["analyticsinmotion/integrate-palm-into-word"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/analyticsinmotion/integrate-palm-into-word","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/analyticsinmotion%2Fintegrate-palm-into-word","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/analyticsinmotion%2Fintegrate-palm-into-word/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/analyticsinmotion%2Fintegrate-palm-into-word/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/analyticsinmotion%2Fintegrate-palm-into-word/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/analyticsinmotion","download_url":"https://codeload.github.com/analyticsinmotion/integrate-palm-into-word/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/analyticsinmotion%2Fintegrate-palm-into-word/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264505780,"owners_count":23618970,"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":["bison-text","google-bard","google-palm","large-language-model","large-language-models","llm","microsoft-word","palm","palm-2","palm2","palm2-in-ms-word","pathway-langugae-model","text-completion","vba-macros"],"created_at":"2024-11-06T03:34:43.955Z","updated_at":"2025-07-10T00:08:58.501Z","avatar_url":"https://github.com/analyticsinmotion.png","language":"VBA","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\".github/assets/images/analytics-in-motion-banner-integrate-palm-into-word.svg\" width=100% height=100%\u003e\n\n\u003ch1 align=\"center\"\u003eIntegrate PaLM into Word\u003c/h1\u003e\n\n\u003c!-- badges: start --\u003e\n\u003cdiv align=\"center\"\u003e\n  \n\u003c!-- ![Experimental](https://img.shields.io/badge/experimental-yes-brightgreen.svg)\u0026nbsp;\u0026nbsp;--\u003e\n[![MIT license](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/analyticsinmotion/integrate-palm-into-word/blob/main/LICENSE)\u0026nbsp;\u0026nbsp;\n![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows\u0026logoColor=white)\u0026nbsp;\u0026nbsp;\n![Microsoft Word](https://img.shields.io/badge/Microsoft_Word-2B579A?logo=microsoft-word\u0026logoColor=white)\u0026nbsp;\u0026nbsp;\n[![Google](https://img.shields.io/badge/Google-4285F4?style=badge\u0026logo=google\u0026logoColor=white)](https://ai.google/discover/palm2)\u0026nbsp;\u0026nbsp;\n[![Analytics in Motion](https://raw.githubusercontent.com/analyticsinmotion/.github/main/assets/images/analytics-in-motion-github-badge-rounded.svg)](https://www.analyticsinmotion.com)\u0026nbsp;\u0026nbsp;\n  \n\u003c/div\u003e\n\u003c!-- badges: end --\u003e\n\n\u003c!-- DESCRIPTION --\u003e\n## Description\nRapidly test, utilize, and compare Google's latest language model **PaLM2** in Microsoft Word. PaLM 2 is a state-of-the-art language model that boasts upgraded features in terms of its multilingual capacity, reasoning ability, and coding capabilities.\nBy integrating PaLM 2 into Microsoft Word, this project aims to make the latest in Google's advanced AI capabilities directly accessible and easy to use.\n\u003cbr /\u003e\u003cbr /\u003e\n\n\n\n\n\n\nhttps://github.com/analyticsinmotion/integrate-palm-into-word/assets/52817125/720592f1-8ce8-4249-96a6-fa5c8b0eac1a\n\n\n\n\n\n\n\u003cbr /\u003e\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n### Dependencies\n- Requires an MakerSuite API Key (apply for the waitlist here: \u003ca href=\"https://makersuite.google.com/app/apikey\"\u003ehttps://makersuite.google.com/app/apikey\u003c/a\u003e)\n- Requires Microsoft Windows 10/11 (\u003ca href=\"https://www.microsoft.com/en-au/windows\"\u003ehttps://www.microsoft.com/en-au/windows\u003c/a\u003e)\n- Requires Microsoft Word 365 (\u003ca href=\"https://www.microsoft.com/en-us\"\u003ehttps://www.microsoft.com/en-us\u003c/a\u003e)\n\nPlease be aware that access to PaLM API and Makersuite are currently only available in the *United States*. Users will receive a \"400:Bad Request\" message should they try to use this project outside the available regions. To monitor available regions please check here: [https://developers.generativeai.google/available_regions](https://developers.generativeai.google/available_regions)\n\nIn addition, the PaLM API is currently in public preview. Please read the [PaLM API and MakerSuite Additional Terms of Service](https://developers.generativeai.google/terms) for more information. \n\u003cbr /\u003e\u003cbr /\u003e\n\n\u003c!-- Installation --\u003e\n## Installation\n\nThere are 4 basic steps in order to add PaLM's Text Generation capability into Microsoft Word:\n  1. Enable the Developer Tab\n  2. Import the VBA script file\n  3. Create the PaLM Text Completion button\n  4. Add your MakerSuite API Key\n\nEach of these steps are fully outlined in the expandable sections below. \n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch3\u003e\u0026nbsp;Enable the Developer Tab\u003c/h3\u003e\u003c/summary\u003e\n\nThe Developer tab isn't displayed by default, but you can add it to the ribbon.\n\n**Step 1** - On the File tab, go to Options \u003e Customize Ribbon.\n\n**Step 2** - Under Customize the Ribbon and under Main Tabs, select the Developer check box.\n\n  \n\u003cimg src=\".github/assets/images/enable-developer-tab-highlighted.png\" width=80% height=80%\u003e\n\u003cbr /\u003e\n\nThe latest instructions to enable the Developer Tab from Microsoft can be found here: \n\u003ca href=\"https://support.microsoft.com/en-us/office/show-the-developer-tab-in-word-e356706f-1891-4bb8-8d72-f57a51146792\"\u003ehttps://support.microsoft.com/en-us/office/show-the-developer-tab-in-word-e356706f-1891-4bb8-8d72-f57a51146792\u003c/a\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch3\u003e\u0026nbsp;Import the VBA script file\u003c/h3\u003e\u003c/summary\u003e\n\n**Step 1** - Download and Save the latest ```PalmText.bas``` file from the src/windows folder in this repository.\n\u003cbr /\u003e\n\nKeep the location of where the file is saved as you will need it later.\u003cbr /\u003e\n\n**Step 2** - On the Developer tab, click the Visual Basic button.\n\u003cimg src=\".github/assets/images/developer-tab-visual-basic.png\" width=100% height=100%\u003e\n\u003cbr /\u003e\n\n**Step 3** - On the File tab, go to Import File...\n\n\u003cimg src=\".github/assets/images/visual-basic-file-import-section.png\" width=100% height=100%\u003e\n\n\u003cbr /\u003e\n\u0026nbsp;\n\n**Step 4** - Select the ```PalmText.bas``` file and click Open\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch3\u003e\u0026nbsp;Create the PaLM Text Completion button\u003c/h3\u003e\u003c/summary\u003e\n\n*Please Note:* This project uses the same ribbon as three of our other projects: \n - **Add ChatGPT to Microsoft Word** - project can be found \u003ca href=\"https://github.com/analyticsinmotion/add-chatgpt-to-microsoft-word\"\u003ehere\u003c/a\u003e \n - **Create Images with DALL·E in Microsoft Word** - project can be found \u003ca href=\"https://github.com/analyticsinmotion/create-images-with-dall-e-in-microsoft-word\"\u003ehere\u003c/a\u003e \n - **Add GPT Chatbot to Microsoft Word** - project can be found \u003ca href=\"https://github.com/analyticsinmotion/add-gpt-chatbot-to-microsoft-word\"\u003ehere\u003c/a\u003e\n\nIf you have have already added any one of these projects into Microsoft Word you can start at Step 3 of this section.\n\u003cbr /\u003e\u003cbr /\u003e\n\n**Step 1** - Add a new tab\n\u003cbr /\u003e\n  - On the File tab, go to Options \u003e Customize Ribbon\n  - Click New Tab\n\u003cbr /\u003e\n\n\u003cimg src=\".github/assets/images/options-customize-ribbon-new-tab.png\" width=40% height=40%\u003e\n\u003cbr /\u003e\n\u0026nbsp;\n\n **Step 2** - Rename the New Tab to **AI Assistant**\n\n\u003cimg src=\".github/assets/images/options-customize-ribbon-rename-tab.png\" width=35% height=35%\u003e\n\u003cbr /\u003e\n\u0026nbsp;\n\n**Step 3** - Rename New Group (Custom) to **PaLM**\n\n\u003cimg src=\".github/assets/images/rename-new-group.png\" width=35% height=35%\u003e\n\u003cbr /\u003e\n\u0026nbsp;\n\n**Step 4** - Select Macros in the Choose Commands from dropdown box\n\n\u003cimg src=\".github/assets/images/choose-commands-from-macros.png\" width=35% height=35%\u003e\n\u003cbr /\u003e\n\u0026nbsp;\n\n**Step 5** - Select the PaLMText Macro and click Add \u003e\u003e\n\n\u003cimg src=\".github/assets/images/add-the-macro-into-new-group.png\" width=75% height=75%\u003e\n\u003cbr /\u003e\n\u0026nbsp;\n\n**Step 6** - Rename button from *Normal.PalmText.PalmText* to **Text Completion**, select a Symbol and click OK\n\n\u003cimg src=\".github/assets/images/rename-button.png\" width=35% height=35%\u003e\n\u003cbr /\u003e\n\u0026nbsp;\n\nAfter the preceding steps have been completed the Microsoft Word screen should look like the following:\n\n\u003cimg src=\".github/assets/images/screen-after-button-added.png\" width=100% height=100%\u003e\n\u003cbr /\u003e\n\u003c/details\u003e\n\n\n\n\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch3\u003e\u0026nbsp;Add your MakerSuite API Key\u003c/h3\u003e\u003c/summary\u003e\n\n**Step 1** - Open the Start menu and start typing \"environment variables\". When the best match appears click \"Edit the system environment variables\" result.\n\n\u003cimg src=\".github/assets/images/add-env-var-step-1.png\" width=75% height=75%\u003e\n\u003cbr /\u003e\n\u0026nbsp;\n\n**Step 2** - Click the \"Environment variables\" button under the \"Advanced\" tab.\n\n\u003cimg src=\".github/assets/images/add-env-var-step-2.png\" width=50% height=50%\u003e\n\u003cbr /\u003e\n\u0026nbsp;\n\n**Step 3** - Create a new user variable by clicking \"New\" under the \"User Variables\" section.\n\n\u003cimg src=\".github/assets/images/add-env-var-step-3.png\" width=50% height=50%\u003e\n\u003cbr /\u003e\n\u0026nbsp;\n\n**Step 4** - Type the variable name **GOOGLE_PALM_API_KEY** in the first field and your MakerSuite API KEY in the variable value field. Then click OK.\n\n\u003cimg src=\".github/assets/images/add-env-var-step-4.png\" width=50% height=50%\u003e\n\u003cbr /\u003e\n\u0026nbsp;\n\n**Step 5** - **IMPORTANT** You must restart Windows to apply the new environment variable\n\u003c/details\u003e\n\n\u003cbr /\u003e\n\n\n\u003c!-- AI Model --\u003e\n## AI Model Information\n\nThis application uses the following Pathways Language Model:\n \n| Generation  | Model | Description | Max Input | Max Output | Temperature | top_p | top_k |\n| ------------- | ------------- |------------- | ------------- | ------------- | :-----------: | :-----------: | :-----------: |\n| PaLM 2  | text-bison-001 | Model targeted for text generation | 8,196 tokens | 1,024 tokens | 0.7 | 0.95 | 40 |\n\nFurther information about this model can be found here: \n- \u003ca href=\"https://blog.google/technology/ai/google-palm-2-ai-large-language-model/\"\u003ehttps://blog.google/technology/ai/google-palm-2-ai-large-language-model/\u003c/a\u003e\n- \u003ca href=\"https://ai.googleblog.com/2022/04/pathways-language-model-palm-scaling-to.html\"\u003ehttps://ai.googleblog.com/2022/04/pathways-language-model-palm-scaling-to.html\u003c/a\u003e\n\u003cbr /\u003e\u003cbr /\u003e\n\n\u003c!-- Best Practices for API Key Safety --\u003e\n## Best Practices for API Key Safety\n\nYour MakerSuite API KEY key/s should be kept secure and private at all times.\n\nPlease follow the best practices guide for API security from Google:\n\u003cbr /\u003e\n\u003ca href=\"https://support.google.com/googleapi/answer/6310037?hl=en\"\u003ehttps://support.google.com/googleapi/answer/6310037?hl=en\u003c/a\u003e\n\n\n\u003cbr /\u003e\n\n\u003c!-- Disclaimers --\u003e\n## Disclaimers\n- This project/repository is an independent initiative created for testing purposes and convenience.\n- This project/repository is not affiliated with, endorsed, approved or sponsored by Microsoft Corporation, its subsidiaries or any other affiliates. \n- This project/repository is not affiliated with, endorsed, approved or sponsored by Alphabet Inc., its subsidiary Google or any other affiliates.\n- This project is experimental and contains API's and code that are not ready for any type of Production usage. Support and/or new releases may be limited.\n\n\u003cbr /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanalyticsinmotion%2Fintegrate-palm-into-word","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanalyticsinmotion%2Fintegrate-palm-into-word","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanalyticsinmotion%2Fintegrate-palm-into-word/lists"}