Skip to content

Commit

Permalink
Added a new json file storing key-value pairs. Also updated the packa…
Browse files Browse the repository at this point in the history
…ge.json file, removing unnecessary dependencies, and making some minor adjustments in index.ts for CORS support.

- Added a new JSON file storing key-value pairs
- Updated package.json file dependencies
- Made minor adjustments in index.ts for CORS support

Developer's joke: "Why was the developer always calm during debugging? Because he stayed cool thanks to his CSS!"

Files:
A  .node-persist/storage/a9d3e96b54eb375c649898d63fd17be45206988a8d12975dd52468cbe494d4f8
A  .node-persist/storage/c18ee18f16c79c711259d45b97f485d7b7b9d91def84530139f5cc815b1dd630
M  bun.lockb
M  package.json
M  src/index.ts

Committed using auto-commit: Sat Jun 15 2024 17:55:35 GMT-0700 (Pacific Daylight Time)
Autocommit project: https://www.npmjs.com/package/@dobuki/autocommit
  • Loading branch information
jacklehamster committed Jun 16, 2024
1 parent a10a9da commit 842ae1a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"key":"gpt-3.5-turbo-1106-an angel with wings-path-k-pop","value":[{"role":"assistant","content":{"creature":"You see a graceful, glowing angel with magnificent white wings.","player":{"A":"Hello there!","B":"You look fascinating. What brings you here?","C":"I challenge you to a duel!","D":"Farewell for now."},"attributes":{"anger":0,"seduced":0,"trust":0,"fear":0},"actions":{"fight":false,"run away":false,"trade":false,"join party":false},"info":{"name":null}}},{"role":"user","content":"k-pop"},{"role":"assistant","content":{"creature":"K-pop? I've heard beautiful melodies from the world above. The music lifts my spirit.","player":{"A":"I'm a huge fan of k-pop too! Who's your favorite group?","B":"Would you like to listen to some k-pop with me?","C":"I'm not really into k-pop. Do you like any other genre of music?","D":"It was nice chatting with you. Goodbye."},"attributes":{"anger":0,"seduced":0,"trust":0,"fear":0},"actions":{"fight":false,"run away":false,"trade":false,"join party":false},"info":{"name":null}}}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"key":"oUjloEeNurfHTxiR4q59wA==","value":"\"Oh, for the love of... Not again! How did I end up here, and why am I naked? Ugh, I need to lay off the party potions next time.\""}
Binary file modified bun.lockb
Binary file not shown.
29 changes: 3 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,10 @@
"dist"
],
"devDependencies": {
"@dobuki/auto-publish": "^1.0.7",
"@types/bun": "^1.1.1",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.6",
"@types/mathjs": "^9.4.2",
"@types/mocha": "^10.0.3",
"@types/node-persist": "^3.1.8",
"@types/react": "^18.3.1",
"@types/seedrandom": "^3.0.8",
"bun": "^1.1.7",
"bun-types": "^1.1.7",
"dotenv": "^16.4.5",
"jest": "^29.7.0",
"package-name-fixer": "^1.0.9",
"prettier": "^3.0.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.4.5"
},
"peerDependencies": {
"typescript": "^5.0.0"
"@dobuki/dev-dependencies": "^1.0.11",
"@types/node-persist": "^3.1.8"
},
"dependencies": {
"baojs": "^0.2.1",
"express": "^4.19.2",
"node-persist": "^4.0.1",
"openai": "^4.42.0",
"serve-static-bun": "^0.5.3"
"openai": "^4.42.0"
}
}
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ import { NpcModel } from "./model/NpcModel";
import { makeComment } from "./power-troll/comment";

const app = express();

app.use(function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
res.setHeader('Access-Control-Allow-Credentials', "true");
next();
});

const port = parseInt(process.env.PORT ?? "3001");

interface Query {
Expand Down

0 comments on commit 842ae1a

Please sign in to comment.