Created
July 24, 2022 20:26
-
-
Save vutlhari/ab680d514bd912c4956b4b58c714be18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GTP-3 Categorizer | |
description: '' | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
/** | |
* Returns category data from GPT-3 | |
* @customfunction | |
* @param {string} transaction | |
*/ | |
async function categorize(transaction) { | |
const url = `https://vt.dandavey.repl.co/ai/categorize`; | |
const options = { | |
method: "POST", | |
body: JSON.stringify({ transaction }), | |
headers: { | |
Authorization: "Bearer vt_is_awesome", | |
"Content-Type": "application/json" | |
} | |
}; | |
const fetchResult = await fetch(url, options); | |
const jsonResponse = await fetchResult.json(); | |
return jsonResponse.result; | |
} | |
language: typescript | |
libraries: | | |
https://appsforoffice.microsoft.com/lib/1/hosted/office.js | |
@types/office-js | |
office-ui-fabric-js@1.4.0/dist/css/fabric.min.css | |
office-ui-fabric-js@1.4.0/dist/css/fabric.components.min.css | |
core-js@2.4.1/client/core.min.js | |
@types/core-js | |
jquery@3.1.1 | |
@types/jquery@3.3.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment