Compare commits

..

No commits in common. "631dd28d9a198d7a670f3669ef83c055123d2bac" and "842bb2ff4159774112b061b9a81ac20a8a5ad0b3" have entirely different histories.

4 changed files with 2 additions and 26 deletions

View file

@ -1,2 +0,0 @@
node_modules
dist

View file

@ -1,13 +0,0 @@
FROM node:18-alpine as build
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
FROM node:18-alpine as run
WORKDIR /app
COPY --from=build /app/package*.json /app/index.js /app/note_validator.js /app/core.js /usr/src/app/
COPY --from=build /app/dist/ /usr/src/app/dist/
RUN npm install --omit=dev
CMD npm run start
EXPOSE 80

View file

@ -1,8 +0,0 @@
version: "3"
services:
anopaper:
build: .
ports:
- "80:80"
restart: unless-stopped

View file

@ -15,17 +15,16 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import OpenAi from "openai";
import { Configuration, OpenAIApi } from "openai";
async function Complete(text) {
document.body.style.cursor = "wait";
let initText = text;
const configuration = new OpenAi({
const configuration = new Configuration({
apiKey: settings.openAiKey,
});
const openai = new OpenAIApi(configuration);
const response = await openai.createCompletion({
model: "text-davinci-003",