-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
10,368 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
# openai-moderation-action | ||
From Spring 2023 Hackathon - sends file content along with hard-coded prompt to openai and returns the response | ||
# ai-moderation-comment-action | ||
|
||
For local dev you need to install ncc bundler tool: | ||
`install npm i -g @vercel/ncc` | ||
|
||
Then after making any changes, you need to run the following command before pushing: | ||
`ncc build index.js` | ||
|
||
This will combine your code + all the dependencies in node_modules into a single .js file in the dist dir. | ||
|
||
Its important to have a single file otherwise the action may not work correctly (per official github docs on custom JS actions). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'Docs AI Moderation Comment' | ||
description: 'Takes list of file paths and returns AI moderation comment' | ||
inputs: | ||
OPEN_AI_API_KEY: | ||
description: 'API key to access the AI' | ||
required: true | ||
filepaths: | ||
description: 'String of file paths separated by spaces' | ||
required: true | ||
outputs: | ||
message: | ||
description: 'The response from the AI' | ||
runs: | ||
using: 'node16' | ||
main: 'dist/index.js' | ||
|
Oops, something went wrong.