mirror of
https://github.com/artegoser/AnoPaper.git
synced 2024-11-23 20:36:21 +03:00
Compare commits
No commits in common. "631dd28d9a198d7a670f3669ef83c055123d2bac" and "842bb2ff4159774112b061b9a81ac20a8a5ad0b3" have entirely different histories.
631dd28d9a
...
842bb2ff41
4 changed files with 2 additions and 26 deletions
|
@ -1,2 +0,0 @@
|
||||||
node_modules
|
|
||||||
dist
|
|
13
Dockerfile
13
Dockerfile
|
@ -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
|
|
|
@ -1,8 +0,0 @@
|
||||||
version: "3"
|
|
||||||
|
|
||||||
services:
|
|
||||||
anopaper:
|
|
||||||
build: .
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
restart: unless-stopped
|
|
|
@ -15,17 +15,16 @@
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
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) {
|
async function Complete(text) {
|
||||||
document.body.style.cursor = "wait";
|
document.body.style.cursor = "wait";
|
||||||
|
|
||||||
let initText = text;
|
let initText = text;
|
||||||
|
|
||||||
const configuration = new OpenAi({
|
const configuration = new Configuration({
|
||||||
apiKey: settings.openAiKey,
|
apiKey: settings.openAiKey,
|
||||||
});
|
});
|
||||||
|
|
||||||
const openai = new OpenAIApi(configuration);
|
const openai = new OpenAIApi(configuration);
|
||||||
const response = await openai.createCompletion({
|
const response = await openai.createCompletion({
|
||||||
model: "text-davinci-003",
|
model: "text-davinci-003",
|
||||||
|
|
Loading…
Add table
Reference in a new issue