https://github.com/nicucalcea/sheets-llm
Use Large Language Models (LLM) in Google Sheets
https://github.com/nicucalcea/sheets-llm
chatgpt google-sheets google-sheets-addon gpt-4 llm
Last synced: about 2 months ago
JSON representation
Use Large Language Models (LLM) in Google Sheets
- Host: GitHub
- URL: https://github.com/nicucalcea/sheets-llm
- Owner: nicucalcea
- License: gpl-3.0
- Created: 2024-04-20T23:43:32.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-20T11:34:32.000Z (9 months ago)
- Last Synced: 2024-10-27T13:04:53.037Z (6 months ago)
- Topics: chatgpt, google-sheets, google-sheets-addon, gpt-4, llm
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 20
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Use GPT models in Google Sheets
A simple script to use OpenAI's GPT models in Google Sheets. This allows you to do things like summarisation, translation, entity extraction, classification, etc.
## Installation
1. Open the Google Sheet where you want to use ChatGPT.
2. Go to `Extensions` > `Apps Script`.
3. Copy the contents of [`Code.gs`](https://github.com/nicucalcea/sheets-llm/blob/main/Code.gs) and paste it into the script editor.
4. Copy the contents of [`settings.html`](https://github.com/nicucalcea/sheets-llm/blob/main/settings.html) and paste it into a new HTML file with the same name.
5. Save both and reload the Google Sheet.
6. You should now see a new menu item called `LLM`. Click on it and then `Settings`.
7. Enter your [OpenAI API key](https://platform.openai.com/settings/profile?tab=api-keys) and save.## Usage
You now have access to a new `=LLM()` function in Google Sheets. You can use it like this:
```scala
=LLM(, "Summarise the text", "gpt-4o-mini", 0)
```By default, the function uses the `gpt-4o-mini` model with a temperature of `0`, but you can change it to `gpt-4` for more advanced tasks or increase the temperature for more creative responses.
## To-do
- [ ] Add support for non-OpenAI models