added ollamajs esm

This commit is contained in:
Kevin Dang
2024-01-25 18:24:37 -08:00
parent 78921ee571
commit aaf734b06c
4 changed files with 25 additions and 14 deletions

18
.gitignore vendored
View File

@@ -1,10 +1,13 @@
# Credentials
.env
.dev.env
# Created by https://www.toptal.com/developers/gitignore/api/node # Created by https://www.toptal.com/developers/gitignore/api/node
# Edit at https://www.toptal.com/developers/gitignore?templates=node # Edit at https://www.toptal.com/developers/gitignore?templates=node
# dotenv environment variable files
.env
.env.dev.local
.env.test.local
.env.production.local
.env.local
### Node ### ### Node ###
# Logs # Logs
logs logs
@@ -80,13 +83,6 @@ web_modules/
# Yarn Integrity file # Yarn Integrity file
.yarn-integrity .yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/) # parcel-bundler cache (https://parceljs.org/)
.cache .cache
.parcel-cache .parcel-cache

16
package-lock.json generated
View File

@@ -12,7 +12,8 @@
"axios": "^1.6.2", "axios": "^1.6.2",
"concurrently": "^8.2.2", "concurrently": "^8.2.2",
"discord.js": "^14.14.1", "discord.js": "^14.14.1",
"dotenv": "^16.3.1" "dotenv": "^16.3.1",
"ollama": "^0.4.3"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.10.5", "@types/node": "^20.10.5",
@@ -1312,6 +1313,14 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/ollama": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/ollama/-/ollama-0.4.3.tgz",
"integrity": "sha512-l8RtRp5uKhvqbAmA9n5PS4ZW1RPbA2CPSlNinJ+jVQYD36UjxPQphEPxp0etH/wqY26nHyM6HQEHatIfrW0+Tw==",
"dependencies": {
"whatwg-fetch": "^3.6.20"
}
},
"node_modules/picomatch": { "node_modules/picomatch": {
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
@@ -1598,6 +1607,11 @@
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
"dev": true "dev": true
}, },
"node_modules/whatwg-fetch": {
"version": "3.6.20",
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz",
"integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg=="
},
"node_modules/wrap-ansi": { "node_modules/wrap-ansi": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",

View File

@@ -19,7 +19,8 @@
"axios": "^1.6.2", "axios": "^1.6.2",
"concurrently": "^8.2.2", "concurrently": "^8.2.2",
"discord.js": "^14.14.1", "discord.js": "^14.14.1",
"dotenv": "^16.3.1" "dotenv": "^16.3.1",
"ollama": "^0.4.3"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.10.5", "@types/node": "^20.10.5",

View File

@@ -2,7 +2,7 @@ import { resolve } from "path"
import { config } from "dotenv" import { config } from "dotenv"
// Find config - ONLY WORKS WITH NODEMON // Find config - ONLY WORKS WITH NODEMON
const envFile = process.env.NODE_ENV === "development" ? ".dev.env" : ".env" const envFile = process.env.NODE_ENV === "development" ? ".env.dev.local" : ".env"
// resolve config file // resolve config file
const envFilePath = resolve(process.cwd(), envFile) const envFilePath = resolve(process.cwd(), envFile)