Skip to content

About

Excel based addins linked to external sources

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo-GPT-Excel Add In alt text

Excel based addins linked to external sources via API

Microsoft Excel   ChatGPT   MIT license   OpenAI  

1. Description

There two excel add-ins in this repo: The AI_Plugin - This plugin links with ChatGPT by requring users to input their API key which can be obtained from Chat Plyaground - OpenAI API Azure_GPT_Addin - This plugin links with AzureOpenAI by requiring users to input their API key, endpoint, deployment model and API version.


2. Getting started

2.1 Dependancies

2.2 Editing

  • Visual Studio Code (https://code.visualstudio.com/)
  • Microsoft Visual Basic for Applications - ensure the below references are used to run, particularly the Microsoft Scripting Runtime.alt text

2.3 Repo Structure

This repository contains the two plugins allong with their respective sripts, the The AI_Plugin corresponds to OpenAI-CGPT script folder and Azure_GPT_Addin corresponds to AzureOpenAI script folder.

├── assets
├── plugins
│   ├── AI_Plugin.xlam
│   │   
│   └── Azure_GPT_Addin.xlam
├── scripts
│   ├── AzureOpenAI
│   │   ├── modGlobals.bas 
|   |   ├── modMain.bas
|   |   ├── modRibbon.xml
|   |   ├── modUI.bas
|   |   ├── modUtilities.bas 
│   └── OpenAI-CGPT
|   │   ├── modGlobals.bas
|   |   ├── modMain.bas
|   |   ├── modRibbon.xml
|   |   ├── modUI.bas
|   |   ├── modUtilities.bas

3. How To Use

Lets begin with the Azure_GPT_Addin followed by the AI_Plugin

3.1 Azure_GPT_Addin

To use this addin effectively ensure to complete all the necessary settings as circled in red in the image.

  • SetAPIkey : This setting would need to done prior to usage
  • Set Model : This would be our Deployment Name not the actual gpt model
  • Set Azure Endpoint: This will be url endpoint provided to you when deploying you application.
  • Set API : This will default to 2024-02-15-preview and can be changed if this version deprecates (see here https://learn.microsoft.com/en-us/azure/ai-services/openai/reference ).

Once the settings is completed, you should select the the data to be queried and click on the Ask AI icon, The results of the query will be displayed in a separate sheet called Results. alt text

3.2 AI_Plugin

To use this addin effectively ensure to complete all the necessary settings as circled in red in the image.

  • SetAPIkey : This setting would need to done prior to usage
  • Set Model: This would be the GPT model to use such as GPT-4o, note the default model is gpt-3.5-turbo which can be changed alt text

Please be aware of the costs associated with using the OpenAI API when using this addin.

4. OpenAI Rate Limits

Rate limits are restrictions that OpenAI API imposes on the number of times a user or client can access their services within a specified period of time. (See for more detail https://platform.openai.com)

Note also the Max tokens used for both plugins is 1024, this can be changed in modMain in both plugins

About

Excel based addins linked to external sources

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages