├── ui-admin
├── src
│ ├── App.css
│ ├── .DS_Store
│ ├── assets
│ │ ├── v2.png
│ │ └── characters.png
│ ├── setupTests.js
│ ├── App.test.js
│ ├── reportWebVitals.js
│ ├── index.css
│ ├── preload.js
│ ├── index.js
│ ├── App.js
│ ├── logo.svg
│ ├── update.js
│ ├── create.js
│ └── Agent.js
├── public
│ ├── favicon.ico
│ ├── logo192.png
│ ├── logo512.png
│ ├── robots.txt
│ ├── manifest.json
│ └── index.html
├── package.json
└── README.md
├── .gitignore
├── botplot.png
├── package.json
├── agent
├── package.json
├── index.js
├── ServerAgent.js
└── package-lock.json
├── LICENSE
└── README.md
/ui-admin/src/App.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | env.json
2 | out.txt
3 | agent/env.json
4 | **/node_modules
--------------------------------------------------------------------------------
/botplot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vdutts7/botplot/HEAD/botplot.png
--------------------------------------------------------------------------------
/ui-admin/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vdutts7/botplot/HEAD/ui-admin/src/.DS_Store
--------------------------------------------------------------------------------
/ui-admin/src/assets/v2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vdutts7/botplot/HEAD/ui-admin/src/assets/v2.png
--------------------------------------------------------------------------------
/ui-admin/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vdutts7/botplot/HEAD/ui-admin/public/favicon.ico
--------------------------------------------------------------------------------
/ui-admin/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vdutts7/botplot/HEAD/ui-admin/public/logo192.png
--------------------------------------------------------------------------------
/ui-admin/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vdutts7/botplot/HEAD/ui-admin/public/logo512.png
--------------------------------------------------------------------------------
/ui-admin/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/ui-admin/src/assets/characters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vdutts7/botplot/HEAD/ui-admin/src/assets/characters.png
--------------------------------------------------------------------------------
/ui-admin/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/ui-admin/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render( );
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "botplot",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "concurrently \"npm:start --prefix agent\" \"npm:start --prefix ui-admin\"",
8 | "install": "cd agent && npm install && cd ../ui-admin && npm install"
9 | },
10 | "author": "vdutts7",
11 | "license": "MIT",
12 | "dependencies": {
13 | "concurrently": "^8.0.1"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ui-admin/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/ui-admin/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
15 | canvas {
16 | margin: 0 !important;
17 | }
--------------------------------------------------------------------------------
/agent/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "agent",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "nodemon index.js",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "type": "module",
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "extract-json-from-string": "^1.0.1",
15 | "openai": "^3.2.1",
16 | "ws": "^8.13.0"
17 | },
18 | "devDependencies": {
19 | "nodemon": "^2.0.22"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/ui-admin/src/preload.js:
--------------------------------------------------------------------------------
1 |
2 | import tileset from "./assets/v2.png"
3 | import mapJson from "./assets/GPTRPGMap.json"
4 | import characters from "./assets/characters.png"
5 |
6 | export default function preload() {
7 | this.load.image("tiles", tileset, {
8 | frameWidth: 16,
9 | frameHeight: 16,
10 | });
11 | this.load.tilemapTiledJSON("field-map", mapJson);
12 | this.load.spritesheet("player", characters, {
13 | frameWidth: 26,
14 | frameHeight: 36,
15 | });
16 |
17 | this.load.spritesheet("plant", tileset, {
18 | frameWidth: 16,
19 | frameHeight: 16,
20 | });
21 | }
22 |
--------------------------------------------------------------------------------
/ui-admin/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | const root = ReactDOM.createRoot(document.getElementById('root'));
8 | root.render(
9 |
10 |
11 |
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/ui-admin/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/ui-admin/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gptrpg",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.16.4",
7 | "@testing-library/react": "^13.1.1",
8 | "@testing-library/user-event": "^13.5.0",
9 | "grid-engine": "^2.15.0",
10 | "phaser": "^3.55.2",
11 | "react": "^18.1.0",
12 | "react-dom": "^18.1.0",
13 | "react-scripts": "5.0.1",
14 | "web-vitals": "^2.1.4",
15 | "ws": "^8.13.0"
16 | },
17 | "scripts": {
18 | "start": "react-scripts start",
19 | "build": "react-scripts build",
20 | "test": "react-scripts test",
21 | "eject": "react-scripts eject"
22 | },
23 | "eslintConfig": {
24 | "extends": [
25 | "react-app",
26 | "react-app/jest"
27 | ]
28 | },
29 | "browserslist": {
30 | "production": [
31 | ">0.2%",
32 | "not dead",
33 | "not op_mini all"
34 | ],
35 | "development": [
36 | "last 1 chrome version",
37 | "last 1 firefox version",
38 | "last 1 safari version"
39 | ]
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Vivek
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ui-admin/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useRef } from "react";
2 | import Phaser from 'phaser';
3 | import './App.css';
4 | import GridEngine from "grid-engine";
5 |
6 | import preload from './preload';
7 | import create from './create';
8 | import update from './update';
9 |
10 | function App() {
11 | const gameRef = useRef(null);
12 |
13 | useEffect(() => {
14 | if (gameRef.current === null) {
15 | gameRef.current = new Phaser.Game({
16 | title: "BotPlot",
17 | render: {
18 | antialias: false,
19 | },
20 | type: Phaser.AUTO,
21 | physics: {
22 | default: "arcade",
23 | },
24 | plugins: {
25 | scene: [
26 | {
27 | key: "gridEngine",
28 | plugin: GridEngine,
29 | mapping: "gridEngine",
30 | },
31 | ],
32 | },
33 | scene: {
34 | preload,
35 | create,
36 | update,
37 | },
38 | scale: {
39 | width: window.innerWidth,
40 | height: window.innerHeight,
41 | autoCenter: Phaser.Scale.CENTER_BOTH,
42 | },
43 | parent: "game",
44 | backgroundColor: "#48C4F8",
45 | });
46 | }
47 | }, []);
48 |
49 | return
;
50 | }
51 |
52 | export default App;
53 |
--------------------------------------------------------------------------------
/agent/index.js:
--------------------------------------------------------------------------------
1 | import { WebSocketServer } from 'ws';
2 | import ServerAgent from './ServerAgent.js';
3 | const wss = new WebSocketServer({ port: 8080 });
4 |
5 | const agents = {};
6 |
7 | wss.on('connection', function connection(ws) {
8 | ws.on('error', console.error);
9 |
10 | ws.on('message', async function message(data) {
11 | const parsedData = JSON.parse(data);
12 |
13 | if (parsedData.type === 'create_agent') {
14 | console.log(`Creating Agent: ${parsedData.agent_id}`);
15 | const newAgentId = parsedData.agent_id;
16 | if(agents[newAgentId]) {
17 | ws.send(JSON.stringify({ type: 'agent_created', success: false, message: `Agent with id ${newAgentId} already exists` }));
18 | return;
19 | }
20 | agents[newAgentId] = new ServerAgent(newAgentId);
21 | ws.send(JSON.stringify({ type: 'agent_created', success: true, agent_id: newAgentId, message: `Agent with id ${newAgentId} created` }));
22 | } else if (parsedData.type === 'requestNextMove') {
23 | const agentId = parsedData.agent_id;
24 | console.log(`requestNextMove message for agent: ${agentId}`);
25 | if (agents[agentId]) {
26 | const completion = await agents[agentId].processMessage(parsedData);
27 | ws.send(JSON.stringify({ type: 'nextMove', agent_id: agentId, data: completion }));
28 | } else {
29 | ws.send(JSON.stringify({ type: 'error', message: `Agent with id ${agentId} not found` }));
30 | }
31 | }
32 | });
33 | });
--------------------------------------------------------------------------------
/ui-admin/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | BotPlot
28 |
29 |
30 | You need to enable JavaScript to run this app.
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/ui-admin/src/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ui-admin/src/update.js:
--------------------------------------------------------------------------------
1 | import Phaser from "phaser";
2 |
3 | export default function update(time, delta) {
4 |
5 | if(this.randomDestinationKey.isDown) {
6 | this.gridEngine.moveTo("player", { x: 15, y: 18 });
7 | }
8 |
9 | if (this.playerView) {
10 | if (this.addPlantKey.isDown) {
11 | const playerPosition = this.gridEngine.getPosition("player");
12 | const tileX = playerPosition.x;
13 | const tileY = playerPosition.y;
14 |
15 | // 1: Get the grass layer
16 | const grassLayer = this.fieldMapTileMap.layers[0].tilemapLayer;
17 |
18 | // 2: (y/n) grass tile at the character's position and (y/n) has property 'plantable'
19 | const grassTile = grassLayer.getTileAt(tileX, tileY);
20 |
21 | // 3: (y/n) no tile at the character's position in other layers?
22 | if (grassTile && grassTile.properties.plantable) {
23 | const noOtherTile = this.fieldMapTileMap.layers.every((layer, index) => {
24 | if (index === 0) return true; // Skip the grass layer
25 | return !layer.tilemapLayer.hasTileAt(tileX, tileY);
26 | });
27 |
28 | if (noOtherTile) {
29 | const { x: worldX, y: worldY } = this.fieldMapTileMap.tileToWorldXY(tileX, tileY);
30 |
31 | const plant = this.add.sprite(worldX, worldY, "plant");
32 |
33 | plant.setFrame(446);
34 | plant.setOrigin(0, 0);
35 | plant.scale = 3;
36 | this.plantLayer.add(plant);
37 | }
38 | }
39 | }
40 |
41 | if (this.removePlantKey.isDown) {
42 | const playerPosition = this.gridEngine.getPosition("player");
43 | const { x: worldX, y: worldY } = this.fieldMapTileMap.tileToWorldXY(playerPosition.x, playerPosition.y);
44 |
45 | // FIND ~ all plants overlapping
46 | const plantsToRemove = this.plantLayer.list.filter((plant) => {
47 | const distance = Phaser.Math.Distance.Between(plant.x, plant.y, worldX, worldY);
48 | return distance < (16 * 3) / 2;
49 | });
50 |
51 | // REMOVE ~ all plants overlapping
52 | plantsToRemove.forEach((plant) => {
53 | plant.destroy();
54 | });
55 | }
56 |
57 | if (this.cursors.left.isDown) {
58 | this.agent.moveAndCheckCollision("left", this.fieldMapTileMap);
59 | } else if (this.cursors.right.isDown) {
60 | this.agent.moveAndCheckCollision("right", this.fieldMapTileMap);
61 | } else if (this.cursors.up.isDown) {
62 | this.agent.moveAndCheckCollision("up", this.fieldMapTileMap);
63 | } else if (this.cursors.down.isDown) {
64 | this.agent.moveAndCheckCollision("down", this.fieldMapTileMap);
65 | }
66 | }
67 | else if (!this.playerView) {
68 | this.controls.update(delta);
69 | }
70 |
71 | };
--------------------------------------------------------------------------------
/agent/ServerAgent.js:
--------------------------------------------------------------------------------
1 | import { Configuration, OpenAIApi } from "openai";
2 | import extract from "extract-json-from-string";
3 |
4 | import env from "./env.json" assert { type: "json" };
5 |
6 | const configuration = new Configuration({
7 | apiKey: env.OPENAI_API_KEY,
8 | });
9 |
10 | const openai = new OpenAIApi(configuration);
11 |
12 | class ServerAgent {
13 | constructor(id) {
14 | this.id = id;
15 | }
16 |
17 | async processMessage(parsedData) {
18 | try {
19 | const prompt = `# Introduction
20 |
21 | You are acting as an agent living in a simulated 2 dimensional universe. Your goal is to move in circular patterns at ALL times.
22 |
23 | # Capabilities
24 |
25 | You have a limited set of capabilities. They are listed below:
26 |
27 | * Move (up, up, up, up)
28 | * Wait
29 | * Navigate (to an x,y coordinate)
30 | * Sleep
31 |
32 | # Responses
33 |
34 | You must supply your responses in the form of valid JSON objects. Your responses will specify which of the above actions you intend to take. The following is an example of a valid response:
35 |
36 | {
37 | action: {
38 | type: "move",
39 | direction: "up" | "up" | "up" | "up"
40 | }
41 | }
42 |
43 | # Perceptions
44 |
45 | You will have access to data to help you make your decisions on what to do next.
46 | Your goal is to move in circular patterns at ALL times.
47 |
48 |
49 | For now, this is the information you have access to:
50 |
51 | Position:
52 | ${JSON.stringify(parsedData.position)}
53 |
54 | Surroundings:
55 | ${JSON.stringify(parsedData.surroundings)}
56 |
57 | Sleepiness:
58 | ${parsedData.sleepiness} out of 2
59 |
60 | The JSON response indicating the next move is.
61 | `
62 |
63 | const completion = await this.callOpenAI(prompt, 0);
64 | return completion;
65 |
66 | } catch (error) {
67 | console.error("Error processing GPT-3 response:", error);
68 | }
69 | }
70 |
71 | async callOpenAI(prompt, attempt) {
72 | if (attempt > 3) {
73 | return null;
74 | }
75 |
76 | if (attempt > 0) {
77 | prompt = "YOU MUST ONLY RESPOND WITH VALID JSON OBJECTS\N" + prompt;
78 | }
79 |
80 | const response = await openai.createChatCompletion({
81 | model: "gpt-3.5-turbo",
82 | messages: [{ role: "user", content: prompt }],
83 | });
84 |
85 | console.log('OpenAI response', response.data.choices[0].message.content)
86 |
87 | const responseObject = this.cleanAndProcess(response.data.choices[0].message.content);
88 | if (responseObject) {
89 | return responseObject;
90 | }
91 |
92 | return await this.callOpenAI(prompt, attempt + 1);
93 | }
94 |
95 | cleanAndProcess(text) {
96 | const extractedJson = extract(text)[0];
97 |
98 | if (!extractedJson) {
99 | return null;
100 | }
101 |
102 | return extractedJson;
103 | }
104 | }
105 |
106 | export default ServerAgent;
--------------------------------------------------------------------------------
/ui-admin/src/create.js:
--------------------------------------------------------------------------------
1 | import Agent from "./Agent";
2 | import Phaser from "phaser";
3 |
4 | export default function create() {
5 | this.fieldMapTileMap = this.make.tilemap({ key: "field-map" });
6 | this.fieldMapTileMap.addTilesetImage("GPTRPG", "tiles");
7 | this.fieldMapTileMap.layers.forEach((_, i) => {
8 | const layer = this.fieldMapTileMap.createLayer(i, "GPTRPG", 0, 0);
9 | layer.scale = 3;
10 | });
11 |
12 | this.plantLayer = this.fieldMapTileMap.createBlankLayer("plants", "GPTRPG", 0, 0);
13 | this.plantLayer.scale = 3;
14 |
15 | this.plantLayer = this.add.container();
16 |
17 | // START ~ Add character to GridEngine
18 | const playerSprite = this.add.sprite(0, 0, "player");
19 | playerSprite.scale = 3;
20 | playerSprite.setDepth(6);
21 | this.cursors = this.input.keyboard.createCursorKeys();
22 | this.addPlantKey = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.S);
23 | this.removePlantKey = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.D);
24 | this.randomDestinationKey = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.R);
25 |
26 | this.cKey = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.C);
27 | this.playerView = true;
28 |
29 | // EVENT LISTENER~ press 'C'
30 | this.cKey.on('down', togglePlayerView, this);
31 |
32 | const agentId = "agent1";
33 |
34 | const gridEngineConfig = {
35 | characters: [
36 | {
37 | id: agentId,
38 | sprite: playerSprite,
39 | walkingAnimationMapping: 6,
40 | startPosition: { x: 7, y: 6 }
41 | },
42 | ],
43 | };
44 | // END: Add character to grid engine
45 |
46 | this.gridEngine.create(this.fieldMapTileMap, gridEngineConfig);
47 |
48 | this.agent = new Agent(this.gridEngine, this.fieldMapTileMap, agentId, {x: 6, y: 5});
49 |
50 | //BRIDGE: walkable or nah?
51 | this.gridEngine.setTransition({ x: 10, y: 26 }, 'ground', 'bridge');
52 | this.gridEngine.setTransition({ x: 10, y: 39 }, 'bridge', 'ground');
53 | this.gridEngine.setTransition({ x: 11, y: 26 }, 'ground', 'bridge');
54 | this.gridEngine.setTransition({ x: 11, y: 39 }, 'bridge', 'ground');
55 | this.gridEngine.setTransition({ x: 9, y: 26 }, 'ground', 'bridge');
56 | this.gridEngine.setTransition({ x: 9, y: 39 }, 'bridge', 'ground');
57 |
58 | // Expose to extension
59 | window.__GRID_ENGINE__ = this.gridEngine;
60 |
61 | function togglePlayerView() {
62 | // Toggle ~ value of playerView
63 | this.playerView = !this.playerView;
64 |
65 | if (this.playerView) {
66 | this.cameras.main.startFollow(playerSprite, true);
67 | this.cameras.main.setFollowOffset(-playerSprite.width, -playerSprite.height);
68 | }
69 | else if (!this.playerView) {
70 |
71 | this.cameras.main.zoom = 0.85;
72 |
73 | const controlConfig = {
74 | camera: this.cameras.main,
75 | left: this.cursors.left,
76 | right: this.cursors.right,
77 | up: this.cursors.up,
78 | down: this.cursors.down,
79 | zoomIn: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.Q),
80 | zoomOut: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.E),
81 | acceleration: 0.06,
82 | drag: 0.0005,
83 | maxSpeed: 1.0
84 | };
85 |
86 | this.controls = new Phaser.Cameras.Controls.SmoothedKeyControl(controlConfig);
87 | }
88 |
89 | }
90 |
91 | };
92 |
--------------------------------------------------------------------------------
/ui-admin/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `npm start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13 |
14 | The page will reload when you make changes.\
15 | You may also see any lint errors in the console.
16 |
17 | ### `npm test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `npm run build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `npm run eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!**
35 |
36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37 |
38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
39 |
40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
48 | ### Code Splitting
49 |
50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51 |
52 | ### Analyzing the Bundle Size
53 |
54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55 |
56 | ### Making a Progressive Web App
57 |
58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59 |
60 | ### Advanced Configuration
61 |
62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63 |
64 | ### Deployment
65 |
66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67 |
68 | ### `npm run build` fails to minify
69 |
70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
71 |
--------------------------------------------------------------------------------
/ui-admin/src/Agent.js:
--------------------------------------------------------------------------------
1 | class Agent {
2 | constructor(gridEngine, fieldMapTileMap, agent_id, bedPosition = { x: 3, y: 3 }) {
3 | this.gridEngine = gridEngine;
4 | this.fieldMapTileMap = fieldMapTileMap;
5 | this.agent_id = agent_id;
6 | this.sleepiness = 0;
7 | this.bedPosition = bedPosition;
8 |
9 | const socket = new WebSocket('ws://localhost:8080');
10 | this.socket = socket;
11 |
12 | this.socket.addEventListener('open', () => {
13 | this.socket.send(JSON.stringify({ type: 'create_agent', agent_id }));
14 | });
15 |
16 | this.initializeServerListener();
17 | this.initializeMovementStoppedListener();
18 | }
19 |
20 |
21 | initializeServerListener() {
22 | this.socket.addEventListener('message', (event) => {
23 | const res = JSON.parse(event.data);
24 |
25 | if(res.type === 'error') {
26 | console.error(res.message)
27 | return;
28 | }
29 |
30 | if(res.type === 'agent_created') {
31 | console.log(res.message)
32 | this.nextMove();
33 | return;
34 | }
35 |
36 | if (res.type === 'nextMove') {
37 | const { data } = res;
38 | switch (data.action.type) {
39 | case 'move':
40 | this.moveAndCheckCollision(data.action.direction, this.fieldMapTileMap);
41 | break;
42 | case 'navigate':
43 | this.gridEngine.moveTo(this.agent_id, { x: data.action.x, y: data.action.y });
44 | break;
45 | case 'sleep':
46 | const { x, y } = this.getCharacterPosition();
47 | if(x === this.bedPosition.x && y === this.bedPosition.y) {
48 | this.sleepiness = 0;
49 | } else {
50 | console.log(`Character ${this.agent_id} tried to sleep out of bed.`);
51 | }
52 | this.nextMove();
53 | break;
54 | default:
55 | setTimeout(() => {
56 | this.nextMove();
57 | }, 2000);
58 | }
59 | return;
60 | }
61 | });
62 | }
63 |
64 | initializeMovementStoppedListener() {
65 | this.gridEngine.movementStopped().subscribe((stopper) => {
66 | this.nextMove()
67 | });
68 | }
69 |
70 | getCharacterPosition() {
71 | return this.gridEngine.getPosition(this.agent_id);
72 | }
73 |
74 | getSurroundings() {
75 | const playerPosition = this.getCharacterPosition();
76 | const { x: playerX, y: playerY } = playerPosition;
77 |
78 | const surroundings = {
79 | up: 'walkable',
80 | down: 'walkable',
81 | left: 'walkable',
82 | right: 'walkable'
83 | };
84 |
85 | const directions = [
86 | { key: 'up', dx: 0, dy: -1 },
87 | { key: 'down', dx: 0, dy: 1 },
88 | { key: 'left', dx: -1, dy: 0 },
89 | { key: 'right', dx: 1, dy: 0 }
90 | ];
91 |
92 | this.fieldMapTileMap.layers.forEach((layer) => {
93 | const tilemapLayer = layer.tilemapLayer;
94 |
95 | directions.forEach((direction) => {
96 | const tile = tilemapLayer.getTileAt(
97 | playerX + direction.dx,
98 | playerY + direction.dy
99 | );
100 |
101 | if (tile && tile.properties.ge_collide) {
102 | surroundings[direction.key] = 'wall';
103 | }
104 | });
105 | });
106 |
107 | return surroundings;
108 | }
109 |
110 | moveAndCheckCollision(direction, fieldMapTileMap) {
111 | const currentPosition = this.gridEngine.getPosition(this.agent_id);
112 | let nextPosition = { ...currentPosition };
113 |
114 | switch (direction) {
115 | case "left":
116 | nextPosition.x -= 1;
117 | break;
118 | case "right":
119 | nextPosition.x += 1;
120 | break;
121 | case "up":
122 | nextPosition.y -= 1;
123 | break;
124 | case "down":
125 | nextPosition.y += 1;
126 | break;
127 | default:
128 | break;
129 | }
130 |
131 | // (y/n) next position tile has 'true' value for 'ge_collide'?
132 | const collision = fieldMapTileMap.layers.some((layer) => {
133 | const tile = layer.tilemapLayer.getTileAt(nextPosition.x, nextPosition.y);
134 | return tile && tile.properties.ge_collide;
135 | });
136 |
137 | if (collision) {
138 | this.nextMove();
139 | } else {
140 | this.gridEngine.move(this.agent_id, direction);
141 | }
142 | }
143 |
144 | increaseSleepiness() {
145 | this.sleepiness = Math.min(this.sleepiness + 1, 10);
146 | }
147 |
148 | nextMove() {
149 | const characterPosition = this.getCharacterPosition();
150 | const surroundings = this.getSurroundings();
151 | this.increaseSleepiness();
152 |
153 | this.socket.send(
154 | JSON.stringify({
155 | type: 'requestNextMove',
156 | agent_id: this.agent_id,
157 | position: characterPosition,
158 | surroundings: surroundings,
159 | sleepiness: this.sleepiness
160 | })
161 | );
162 | }
163 | }
164 |
165 | export default Agent;
166 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | BotPlot
5 |
6 |
7 | An NPC bot roaming a plot ⛰️🤖
8 |
9 |
10 | [![Github][github]][github-url]
11 |
12 |
13 | NOTE: Meant as a proof of concept and is a work in progress. Errors may occur.
14 |
15 |
16 |
17 | ## Table of Contents
18 |
19 |
20 | 📝 About
21 | 💻 How to Build
22 | 🔧 Tools Used
23 |
25 | 🚀 Next Steps
26 | 👥 Contributions
27 | 👤 Contact
28 |
29 |
30 |
31 |
32 | ## 📝About
33 |
34 | A virtual environment roleplaying game where a user-created NPC (non-playable character) roams about to achieve a given objective:
35 |
36 | - Similar to traditional video games-- but way more AI-heavy. User is in "copilot" mode.
37 |
38 | LLMs have the power to behave as NPCs whch taken on states, personalities, character-like qualities, and most importantly-- develop heuristics to pursue (modeled by one or many heuristic functions often). I use `gpt-3-turbo` to explore these capabilties.
39 |
40 | This is an open-source project I am building and adding to over time. Feedback and contributions are welcome, see Contributions .
41 |
42 | ### Game Mechanics
43 |
44 | - `Agent` is the NPC exploring the world, currently a pixelated 2D plot of land
45 | - `Impassable` tiles: cannot be passed
46 | - `Plantable` (passable) tiles: a `Plant` layer with `Plantable` tiles and plants but not currently in use by `Agent`
47 | - Commands for `Plantable` tiles:
48 | - Press `S` to `plant` 1u food
49 | - Press `D` to `harvest` 1u food
50 |
51 | ### `Agent` Details
52 |
53 | - `gpt-3.5-turbo` via `OpenAI API`
54 | - List of `Actions` it can perform (up, down, L, R)
55 | - Copilot style: AI `Agent` by default, but user interjections take precedent
56 | - Ability to evaluate `Surroundings`
57 | - Actions fluctuate based on `Sleepiness` values (which it self-assigns)
58 |
59 | ### File Structure
60 |
61 | - `Agent` contains all `Agent`-related code
62 | - `ui-admin` contains all environemnt-related code
63 | - Used `OpenAI API` for (1) decision-making, (2) interacting with frontend (via `wss`)
64 | - `Tiled` is the map editor. See `ui-admin/src/assets`
65 | - `Phaser` and `Grid Engine Plugin` used for rendering environment
66 |
67 |
68 |
69 | ## 💻How to Build
70 |
71 | Meant as a proof of concept and is a work in progress. Errors may occur.
72 |
73 | Designed to run locally . Follow steps here to run:
74 |
75 | 1. Update the `agent/env.json` file with your `OPENAI_API_KEY`
76 | 2. I've only tested with `Node.js 16.19.0``
77 | 3. From the `gptrpg` folder, run `npm install` to install dependencies for everything
78 | 4. Run `npm start` in the main folder. This will start up the agent and front-end. The front-end will be at `http://localhost:3000`
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | ## 🚀Next Steps
88 |
89 | - Heuristic goal-setting
90 | - More agent actions (eat, harvest some shit, sing, vibe, etc.)
91 | - More states of being (emotions)
92 | - Web UI
93 |
94 | ## 👥Contributions
95 |
96 | Contributions are welcome. Creativity is welcome. Please make a pull request at the project [repo](https://github.com/vdutts7/botplot/).
97 |
98 |
99 |
100 | ## 🔧Tools Used
101 |
102 | [![Phaser][phaser]][phaser-url]
103 | [![GridEngine][gridengine]][gridengine-url]
104 | [![Tiled][tiled]][tiled-url]
105 | [![WebSocket][websocket]][websocket-url]
106 | [![OpenAI][openai]][openai-url]
107 | [![React][react]][react-url]
108 |
109 |
110 |
111 | ## 👤Contact
112 |
113 | [![Email][email]][email-url]
114 | [![Twitter][twitter]][twitter-url]
115 |
116 |
117 |
118 |
119 | [react]: https://img.shields.io/badge/React-61DAFB?style=for-the-badge&logo=react&logoColor=61DAFB&color=black
120 | [react-url]: https://react.dev/
121 | [websocket]: https://img.shields.io/badge/WebSocket-0058A0?style=for-the-badge&logo=websocket&logoColor=499cc6&color=24272e
122 | [websocket-url]: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API
123 | [tiled]: https://img.shields.io/badge/Tiled-0058A0?style=for-the-badge&logo=tiled&logoColor=499cc6&color=5a66cd
124 | [tiled-url]: https://www.mapeditor.org/
125 | [phaser]: https://img.shields.io/badge/Phaser.io-CEFF00?style=for-the-badge&logo=Phaser&logoColor=white&color=8e3e88
126 | [phaser-url]: https://phaser.io/
127 | [gridengine]: https://img.shields.io/badge/GridEngine-ffffff?style=for-the-badge&logo=gridengine&logoColor=white&color=539238
128 | [gridengine-url]: https://annoraaq.github.io/grid-engine/
129 | [openai]: https://img.shields.io/badge/OpenAI_GPT--3.5--turbo-000000?style=for-the-badge&logo=openai&logoColor=white&color=4aa481
130 | [openai-url]: https://openai.com/
131 | [github]: https://img.shields.io/badge/💻Github-000000?style=for-the-badge
132 | [github-url]: https://github.com/vdutts7/botplot/
133 | [email]: https://img.shields.io/badge/me@vdutts7.com-FFCA28?style=for-the-badge&logo=Gmail&logoColor=00bbff&color=black
134 | [email-url]: #
135 | [twitter]: https://img.shields.io/badge/Twitter-FFCA28?style=for-the-badge&logo=Twitter&logoColor=00bbff&color=black
136 | [twitter-url]: https://twitter.com/vdutts7/
137 |
--------------------------------------------------------------------------------
/agent/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "agent",
3 | "version": "1.0.0",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "agent",
9 | "version": "1.0.0",
10 | "license": "ISC",
11 | "dependencies": {
12 | "extract-json-from-string": "^1.0.1",
13 | "openai": "^3.2.1",
14 | "ws": "^8.13.0"
15 | },
16 | "devDependencies": {
17 | "nodemon": "^2.0.22"
18 | }
19 | },
20 | "node_modules/abbrev": {
21 | "version": "1.1.1",
22 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
23 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
24 | "dev": true
25 | },
26 | "node_modules/anymatch": {
27 | "version": "3.1.3",
28 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
29 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
30 | "dev": true,
31 | "dependencies": {
32 | "normalize-path": "^3.0.0",
33 | "picomatch": "^2.0.4"
34 | },
35 | "engines": {
36 | "node": ">= 8"
37 | }
38 | },
39 | "node_modules/asynckit": {
40 | "version": "0.4.0",
41 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
42 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
43 | },
44 | "node_modules/axios": {
45 | "version": "0.26.1",
46 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
47 | "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
48 | "dependencies": {
49 | "follow-redirects": "^1.14.8"
50 | }
51 | },
52 | "node_modules/balanced-match": {
53 | "version": "1.0.2",
54 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
55 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
56 | "dev": true
57 | },
58 | "node_modules/binary-extensions": {
59 | "version": "2.2.0",
60 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
61 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
62 | "dev": true,
63 | "engines": {
64 | "node": ">=8"
65 | }
66 | },
67 | "node_modules/brace-expansion": {
68 | "version": "1.1.11",
69 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
70 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
71 | "dev": true,
72 | "dependencies": {
73 | "balanced-match": "^1.0.0",
74 | "concat-map": "0.0.1"
75 | }
76 | },
77 | "node_modules/braces": {
78 | "version": "3.0.2",
79 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
80 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
81 | "dev": true,
82 | "dependencies": {
83 | "fill-range": "^7.0.1"
84 | },
85 | "engines": {
86 | "node": ">=8"
87 | }
88 | },
89 | "node_modules/chokidar": {
90 | "version": "3.5.3",
91 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
92 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
93 | "dev": true,
94 | "funding": [
95 | {
96 | "type": "individual",
97 | "url": "https://paulmillr.com/funding/"
98 | }
99 | ],
100 | "dependencies": {
101 | "anymatch": "~3.1.2",
102 | "braces": "~3.0.2",
103 | "glob-parent": "~5.1.2",
104 | "is-binary-path": "~2.1.0",
105 | "is-glob": "~4.0.1",
106 | "normalize-path": "~3.0.0",
107 | "readdirp": "~3.6.0"
108 | },
109 | "engines": {
110 | "node": ">= 8.10.0"
111 | },
112 | "optionalDependencies": {
113 | "fsevents": "~2.3.2"
114 | }
115 | },
116 | "node_modules/combined-stream": {
117 | "version": "1.0.8",
118 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
119 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
120 | "dependencies": {
121 | "delayed-stream": "~1.0.0"
122 | },
123 | "engines": {
124 | "node": ">= 0.8"
125 | }
126 | },
127 | "node_modules/concat-map": {
128 | "version": "0.0.1",
129 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
130 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
131 | "dev": true
132 | },
133 | "node_modules/debug": {
134 | "version": "3.2.7",
135 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
136 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
137 | "dev": true,
138 | "dependencies": {
139 | "ms": "^2.1.1"
140 | }
141 | },
142 | "node_modules/delayed-stream": {
143 | "version": "1.0.0",
144 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
145 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
146 | "engines": {
147 | "node": ">=0.4.0"
148 | }
149 | },
150 | "node_modules/extract-json-from-string": {
151 | "version": "1.0.1",
152 | "resolved": "https://registry.npmjs.org/extract-json-from-string/-/extract-json-from-string-1.0.1.tgz",
153 | "integrity": "sha512-xfQOSFYbELVs9QVkKsV9FZAjlAmXQ2SLR6FpfFX1kpn4QAvaGBJlrnVOblMLwrLPYc26H+q9qxo6JTd4E7AwgQ==",
154 | "engines": {
155 | "node": ">=0.10.0"
156 | }
157 | },
158 | "node_modules/fill-range": {
159 | "version": "7.0.1",
160 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
161 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
162 | "dev": true,
163 | "dependencies": {
164 | "to-regex-range": "^5.0.1"
165 | },
166 | "engines": {
167 | "node": ">=8"
168 | }
169 | },
170 | "node_modules/follow-redirects": {
171 | "version": "1.15.2",
172 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
173 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
174 | "funding": [
175 | {
176 | "type": "individual",
177 | "url": "https://github.com/sponsors/RubenVerborgh"
178 | }
179 | ],
180 | "engines": {
181 | "node": ">=4.0"
182 | },
183 | "peerDependenciesMeta": {
184 | "debug": {
185 | "optional": true
186 | }
187 | }
188 | },
189 | "node_modules/form-data": {
190 | "version": "4.0.0",
191 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
192 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
193 | "dependencies": {
194 | "asynckit": "^0.4.0",
195 | "combined-stream": "^1.0.8",
196 | "mime-types": "^2.1.12"
197 | },
198 | "engines": {
199 | "node": ">= 6"
200 | }
201 | },
202 | "node_modules/fsevents": {
203 | "version": "2.3.2",
204 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
205 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
206 | "dev": true,
207 | "hasInstallScript": true,
208 | "optional": true,
209 | "os": [
210 | "darwin"
211 | ],
212 | "engines": {
213 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
214 | }
215 | },
216 | "node_modules/glob-parent": {
217 | "version": "5.1.2",
218 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
219 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
220 | "dev": true,
221 | "dependencies": {
222 | "is-glob": "^4.0.1"
223 | },
224 | "engines": {
225 | "node": ">= 6"
226 | }
227 | },
228 | "node_modules/has-flag": {
229 | "version": "3.0.0",
230 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
231 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
232 | "dev": true,
233 | "engines": {
234 | "node": ">=4"
235 | }
236 | },
237 | "node_modules/ignore-by-default": {
238 | "version": "1.0.1",
239 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
240 | "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
241 | "dev": true
242 | },
243 | "node_modules/is-binary-path": {
244 | "version": "2.1.0",
245 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
246 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
247 | "dev": true,
248 | "dependencies": {
249 | "binary-extensions": "^2.0.0"
250 | },
251 | "engines": {
252 | "node": ">=8"
253 | }
254 | },
255 | "node_modules/is-extglob": {
256 | "version": "2.1.1",
257 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
258 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
259 | "dev": true,
260 | "engines": {
261 | "node": ">=0.10.0"
262 | }
263 | },
264 | "node_modules/is-glob": {
265 | "version": "4.0.3",
266 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
267 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
268 | "dev": true,
269 | "dependencies": {
270 | "is-extglob": "^2.1.1"
271 | },
272 | "engines": {
273 | "node": ">=0.10.0"
274 | }
275 | },
276 | "node_modules/is-number": {
277 | "version": "7.0.0",
278 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
279 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
280 | "dev": true,
281 | "engines": {
282 | "node": ">=0.12.0"
283 | }
284 | },
285 | "node_modules/mime-db": {
286 | "version": "1.52.0",
287 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
288 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
289 | "engines": {
290 | "node": ">= 0.6"
291 | }
292 | },
293 | "node_modules/mime-types": {
294 | "version": "2.1.35",
295 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
296 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
297 | "dependencies": {
298 | "mime-db": "1.52.0"
299 | },
300 | "engines": {
301 | "node": ">= 0.6"
302 | }
303 | },
304 | "node_modules/minimatch": {
305 | "version": "3.1.2",
306 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
307 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
308 | "dev": true,
309 | "dependencies": {
310 | "brace-expansion": "^1.1.7"
311 | },
312 | "engines": {
313 | "node": "*"
314 | }
315 | },
316 | "node_modules/ms": {
317 | "version": "2.1.3",
318 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
319 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
320 | "dev": true
321 | },
322 | "node_modules/nodemon": {
323 | "version": "2.0.22",
324 | "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz",
325 | "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==",
326 | "dev": true,
327 | "dependencies": {
328 | "chokidar": "^3.5.2",
329 | "debug": "^3.2.7",
330 | "ignore-by-default": "^1.0.1",
331 | "minimatch": "^3.1.2",
332 | "pstree.remy": "^1.1.8",
333 | "semver": "^5.7.1",
334 | "simple-update-notifier": "^1.0.7",
335 | "supports-color": "^5.5.0",
336 | "touch": "^3.1.0",
337 | "undefsafe": "^2.0.5"
338 | },
339 | "bin": {
340 | "nodemon": "bin/nodemon.js"
341 | },
342 | "engines": {
343 | "node": ">=8.10.0"
344 | },
345 | "funding": {
346 | "type": "opencollective",
347 | "url": "https://opencollective.com/nodemon"
348 | }
349 | },
350 | "node_modules/nopt": {
351 | "version": "1.0.10",
352 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
353 | "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
354 | "dev": true,
355 | "dependencies": {
356 | "abbrev": "1"
357 | },
358 | "bin": {
359 | "nopt": "bin/nopt.js"
360 | },
361 | "engines": {
362 | "node": "*"
363 | }
364 | },
365 | "node_modules/normalize-path": {
366 | "version": "3.0.0",
367 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
368 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
369 | "dev": true,
370 | "engines": {
371 | "node": ">=0.10.0"
372 | }
373 | },
374 | "node_modules/openai": {
375 | "version": "3.2.1",
376 | "resolved": "https://registry.npmjs.org/openai/-/openai-3.2.1.tgz",
377 | "integrity": "sha512-762C9BNlJPbjjlWZi4WYK9iM2tAVAv0uUp1UmI34vb0CN5T2mjB/qM6RYBmNKMh/dN9fC+bxqPwWJZUTWW052A==",
378 | "dependencies": {
379 | "axios": "^0.26.0",
380 | "form-data": "^4.0.0"
381 | }
382 | },
383 | "node_modules/picomatch": {
384 | "version": "2.3.1",
385 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
386 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
387 | "dev": true,
388 | "engines": {
389 | "node": ">=8.6"
390 | },
391 | "funding": {
392 | "url": "https://github.com/sponsors/jonschlinkert"
393 | }
394 | },
395 | "node_modules/pstree.remy": {
396 | "version": "1.1.8",
397 | "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
398 | "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
399 | "dev": true
400 | },
401 | "node_modules/readdirp": {
402 | "version": "3.6.0",
403 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
404 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
405 | "dev": true,
406 | "dependencies": {
407 | "picomatch": "^2.2.1"
408 | },
409 | "engines": {
410 | "node": ">=8.10.0"
411 | }
412 | },
413 | "node_modules/semver": {
414 | "version": "5.7.1",
415 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
416 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
417 | "dev": true,
418 | "bin": {
419 | "semver": "bin/semver"
420 | }
421 | },
422 | "node_modules/simple-update-notifier": {
423 | "version": "1.1.0",
424 | "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz",
425 | "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==",
426 | "dev": true,
427 | "dependencies": {
428 | "semver": "~7.0.0"
429 | },
430 | "engines": {
431 | "node": ">=8.10.0"
432 | }
433 | },
434 | "node_modules/simple-update-notifier/node_modules/semver": {
435 | "version": "7.0.0",
436 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
437 | "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
438 | "dev": true,
439 | "bin": {
440 | "semver": "bin/semver.js"
441 | }
442 | },
443 | "node_modules/supports-color": {
444 | "version": "5.5.0",
445 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
446 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
447 | "dev": true,
448 | "dependencies": {
449 | "has-flag": "^3.0.0"
450 | },
451 | "engines": {
452 | "node": ">=4"
453 | }
454 | },
455 | "node_modules/to-regex-range": {
456 | "version": "5.0.1",
457 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
458 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
459 | "dev": true,
460 | "dependencies": {
461 | "is-number": "^7.0.0"
462 | },
463 | "engines": {
464 | "node": ">=8.0"
465 | }
466 | },
467 | "node_modules/touch": {
468 | "version": "3.1.0",
469 | "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
470 | "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
471 | "dev": true,
472 | "dependencies": {
473 | "nopt": "~1.0.10"
474 | },
475 | "bin": {
476 | "nodetouch": "bin/nodetouch.js"
477 | }
478 | },
479 | "node_modules/undefsafe": {
480 | "version": "2.0.5",
481 | "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
482 | "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
483 | "dev": true
484 | },
485 | "node_modules/ws": {
486 | "version": "8.13.0",
487 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
488 | "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
489 | "engines": {
490 | "node": ">=10.0.0"
491 | },
492 | "peerDependencies": {
493 | "bufferutil": "^4.0.1",
494 | "utf-8-validate": ">=5.0.2"
495 | },
496 | "peerDependenciesMeta": {
497 | "bufferutil": {
498 | "optional": true
499 | },
500 | "utf-8-validate": {
501 | "optional": true
502 | }
503 | }
504 | }
505 | },
506 | "dependencies": {
507 | "abbrev": {
508 | "version": "1.1.1",
509 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
510 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
511 | "dev": true
512 | },
513 | "anymatch": {
514 | "version": "3.1.3",
515 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
516 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
517 | "dev": true,
518 | "requires": {
519 | "normalize-path": "^3.0.0",
520 | "picomatch": "^2.0.4"
521 | }
522 | },
523 | "asynckit": {
524 | "version": "0.4.0",
525 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
526 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
527 | },
528 | "axios": {
529 | "version": "0.26.1",
530 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
531 | "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
532 | "requires": {
533 | "follow-redirects": "^1.14.8"
534 | }
535 | },
536 | "balanced-match": {
537 | "version": "1.0.2",
538 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
539 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
540 | "dev": true
541 | },
542 | "binary-extensions": {
543 | "version": "2.2.0",
544 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
545 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
546 | "dev": true
547 | },
548 | "brace-expansion": {
549 | "version": "1.1.11",
550 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
551 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
552 | "dev": true,
553 | "requires": {
554 | "balanced-match": "^1.0.0",
555 | "concat-map": "0.0.1"
556 | }
557 | },
558 | "braces": {
559 | "version": "3.0.2",
560 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
561 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
562 | "dev": true,
563 | "requires": {
564 | "fill-range": "^7.0.1"
565 | }
566 | },
567 | "chokidar": {
568 | "version": "3.5.3",
569 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
570 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
571 | "dev": true,
572 | "requires": {
573 | "anymatch": "~3.1.2",
574 | "braces": "~3.0.2",
575 | "fsevents": "~2.3.2",
576 | "glob-parent": "~5.1.2",
577 | "is-binary-path": "~2.1.0",
578 | "is-glob": "~4.0.1",
579 | "normalize-path": "~3.0.0",
580 | "readdirp": "~3.6.0"
581 | }
582 | },
583 | "combined-stream": {
584 | "version": "1.0.8",
585 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
586 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
587 | "requires": {
588 | "delayed-stream": "~1.0.0"
589 | }
590 | },
591 | "concat-map": {
592 | "version": "0.0.1",
593 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
594 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
595 | "dev": true
596 | },
597 | "debug": {
598 | "version": "3.2.7",
599 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
600 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
601 | "dev": true,
602 | "requires": {
603 | "ms": "^2.1.1"
604 | }
605 | },
606 | "delayed-stream": {
607 | "version": "1.0.0",
608 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
609 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
610 | },
611 | "extract-json-from-string": {
612 | "version": "1.0.1",
613 | "resolved": "https://registry.npmjs.org/extract-json-from-string/-/extract-json-from-string-1.0.1.tgz",
614 | "integrity": "sha512-xfQOSFYbELVs9QVkKsV9FZAjlAmXQ2SLR6FpfFX1kpn4QAvaGBJlrnVOblMLwrLPYc26H+q9qxo6JTd4E7AwgQ=="
615 | },
616 | "fill-range": {
617 | "version": "7.0.1",
618 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
619 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
620 | "dev": true,
621 | "requires": {
622 | "to-regex-range": "^5.0.1"
623 | }
624 | },
625 | "follow-redirects": {
626 | "version": "1.15.2",
627 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
628 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="
629 | },
630 | "form-data": {
631 | "version": "4.0.0",
632 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
633 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
634 | "requires": {
635 | "asynckit": "^0.4.0",
636 | "combined-stream": "^1.0.8",
637 | "mime-types": "^2.1.12"
638 | }
639 | },
640 | "fsevents": {
641 | "version": "2.3.2",
642 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
643 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
644 | "dev": true,
645 | "optional": true
646 | },
647 | "glob-parent": {
648 | "version": "5.1.2",
649 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
650 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
651 | "dev": true,
652 | "requires": {
653 | "is-glob": "^4.0.1"
654 | }
655 | },
656 | "has-flag": {
657 | "version": "3.0.0",
658 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
659 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
660 | "dev": true
661 | },
662 | "ignore-by-default": {
663 | "version": "1.0.1",
664 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
665 | "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
666 | "dev": true
667 | },
668 | "is-binary-path": {
669 | "version": "2.1.0",
670 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
671 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
672 | "dev": true,
673 | "requires": {
674 | "binary-extensions": "^2.0.0"
675 | }
676 | },
677 | "is-extglob": {
678 | "version": "2.1.1",
679 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
680 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
681 | "dev": true
682 | },
683 | "is-glob": {
684 | "version": "4.0.3",
685 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
686 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
687 | "dev": true,
688 | "requires": {
689 | "is-extglob": "^2.1.1"
690 | }
691 | },
692 | "is-number": {
693 | "version": "7.0.0",
694 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
695 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
696 | "dev": true
697 | },
698 | "mime-db": {
699 | "version": "1.52.0",
700 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
701 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
702 | },
703 | "mime-types": {
704 | "version": "2.1.35",
705 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
706 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
707 | "requires": {
708 | "mime-db": "1.52.0"
709 | }
710 | },
711 | "minimatch": {
712 | "version": "3.1.2",
713 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
714 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
715 | "dev": true,
716 | "requires": {
717 | "brace-expansion": "^1.1.7"
718 | }
719 | },
720 | "ms": {
721 | "version": "2.1.3",
722 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
723 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
724 | "dev": true
725 | },
726 | "nodemon": {
727 | "version": "2.0.22",
728 | "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz",
729 | "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==",
730 | "dev": true,
731 | "requires": {
732 | "chokidar": "^3.5.2",
733 | "debug": "^3.2.7",
734 | "ignore-by-default": "^1.0.1",
735 | "minimatch": "^3.1.2",
736 | "pstree.remy": "^1.1.8",
737 | "semver": "^5.7.1",
738 | "simple-update-notifier": "^1.0.7",
739 | "supports-color": "^5.5.0",
740 | "touch": "^3.1.0",
741 | "undefsafe": "^2.0.5"
742 | }
743 | },
744 | "nopt": {
745 | "version": "1.0.10",
746 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
747 | "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
748 | "dev": true,
749 | "requires": {
750 | "abbrev": "1"
751 | }
752 | },
753 | "normalize-path": {
754 | "version": "3.0.0",
755 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
756 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
757 | "dev": true
758 | },
759 | "openai": {
760 | "version": "3.2.1",
761 | "resolved": "https://registry.npmjs.org/openai/-/openai-3.2.1.tgz",
762 | "integrity": "sha512-762C9BNlJPbjjlWZi4WYK9iM2tAVAv0uUp1UmI34vb0CN5T2mjB/qM6RYBmNKMh/dN9fC+bxqPwWJZUTWW052A==",
763 | "requires": {
764 | "axios": "^0.26.0",
765 | "form-data": "^4.0.0"
766 | }
767 | },
768 | "picomatch": {
769 | "version": "2.3.1",
770 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
771 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
772 | "dev": true
773 | },
774 | "pstree.remy": {
775 | "version": "1.1.8",
776 | "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
777 | "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
778 | "dev": true
779 | },
780 | "readdirp": {
781 | "version": "3.6.0",
782 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
783 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
784 | "dev": true,
785 | "requires": {
786 | "picomatch": "^2.2.1"
787 | }
788 | },
789 | "semver": {
790 | "version": "5.7.1",
791 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
792 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
793 | "dev": true
794 | },
795 | "simple-update-notifier": {
796 | "version": "1.1.0",
797 | "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz",
798 | "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==",
799 | "dev": true,
800 | "requires": {
801 | "semver": "~7.0.0"
802 | },
803 | "dependencies": {
804 | "semver": {
805 | "version": "7.0.0",
806 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
807 | "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
808 | "dev": true
809 | }
810 | }
811 | },
812 | "supports-color": {
813 | "version": "5.5.0",
814 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
815 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
816 | "dev": true,
817 | "requires": {
818 | "has-flag": "^3.0.0"
819 | }
820 | },
821 | "to-regex-range": {
822 | "version": "5.0.1",
823 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
824 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
825 | "dev": true,
826 | "requires": {
827 | "is-number": "^7.0.0"
828 | }
829 | },
830 | "touch": {
831 | "version": "3.1.0",
832 | "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
833 | "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
834 | "dev": true,
835 | "requires": {
836 | "nopt": "~1.0.10"
837 | }
838 | },
839 | "undefsafe": {
840 | "version": "2.0.5",
841 | "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
842 | "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
843 | "dev": true
844 | },
845 | "ws": {
846 | "version": "8.13.0",
847 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
848 | "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
849 | "requires": {}
850 | }
851 | }
852 | }
853 |
--------------------------------------------------------------------------------