nuxt-chatgpt 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.1.0"
7
+ "version": "0.1.2"
8
8
  }
@@ -1,10 +1,10 @@
1
1
  import { createError } from "h3";
2
2
  import { Configuration, OpenAIApi } from "openai";
3
- const config = useRuntimeConfig();
3
+ import { useRuntimeConfig } from "#imports";
4
4
  export default defineEventHandler(async (event) => {
5
5
  const { prompt } = await readBody(event);
6
6
  const configuration = new Configuration({
7
- apiKey: config.public.chatgpt.apiKey
7
+ apiKey: useRuntimeConfig().public.chatgpt.apiKey
8
8
  });
9
9
  const openai = new OpenAIApi(configuration);
10
10
  try {
package/package.json CHANGED
@@ -1,69 +1,69 @@
1
- {
2
- "name": "nuxt-chatgpt",
3
- "version": "0.1.0",
4
- "description": "ChatGPT integration for Nuxt 3",
5
- "license": "MIT",
6
- "type": "module",
7
- "homepage": "https://vuemadness.com.com/nuxt-chatgpt",
8
- "bugs": {
9
- "url": "https://github.com/schnapsterdog/nuxt-chatgpt/issues"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/schnapsterdog/nuxt-chatgpt"
14
- },
15
- "contributors": [
16
- {
17
- "name": "Oliver Trajceski (@schnapsterdog)"
18
- }
19
- ],
20
- "author": {
21
- "name": "Oliver Trajceski",
22
- "email": "oliver@akrinum.com"
23
- },
24
- "keywords": [
25
- "vue3",
26
- "nuxt3",
27
- "nuxt",
28
- "nuxt.js",
29
- "nuxt-chatgpt"
30
- ],
31
- "exports": {
32
- ".": {
33
- "types": "./dist/types.d.ts",
34
- "import": "./dist/module.mjs",
35
- "require": "./dist/module.cjs"
36
- }
37
- },
38
- "main": "./dist/module.cjs",
39
- "types": "./dist/types.d.ts",
40
- "files": [
41
- "dist"
42
- ],
43
- "scripts": {
44
- "prepack": "nuxt-module-build",
45
- "dev": "nuxi dev playground",
46
- "dev:build": "nuxi build playground",
47
- "dev:generate": "nuxi generate playground",
48
- "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
49
- "dev:preview": "nuxi preview playground",
50
- "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
51
- "lint": "eslint .",
52
- "test": "vitest run",
53
- "test:watch": "vitest watch"
54
- },
55
- "dependencies": {
56
- "@nuxt/kit": "^3.2.3",
57
- "openai": "^3.2.1"
58
- },
59
- "devDependencies": {
60
- "@nuxt/eslint-config": "^0.1.1",
61
- "@nuxt/module-builder": "^0.2.1",
62
- "@nuxt/schema": "^3.2.3",
63
- "@nuxt/test-utils": "^3.2.3",
64
- "changelogen": "^0.5.1",
65
- "eslint": "^8.36.0",
66
- "nuxt": "^3.2.3",
67
- "vitest": "^0.29.2"
68
- }
69
- }
1
+ {
2
+ "name": "nuxt-chatgpt",
3
+ "version": "0.1.2",
4
+ "description": "ChatGPT integration for Nuxt 3",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "homepage": "https://vuemadness.com.com/nuxt-chatgpt",
8
+ "bugs": {
9
+ "url": "https://github.com/schnapsterdog/nuxt-chatgpt/issues"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/schnapsterdog/nuxt-chatgpt"
14
+ },
15
+ "contributors": [
16
+ {
17
+ "name": "Oliver Trajceski (@schnapsterdog)"
18
+ }
19
+ ],
20
+ "author": {
21
+ "name": "Oliver Trajceski",
22
+ "email": "oliver@akrinum.com"
23
+ },
24
+ "keywords": [
25
+ "vue3",
26
+ "nuxt3",
27
+ "nuxt",
28
+ "nuxt.js",
29
+ "nuxt-chatgpt"
30
+ ],
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/types.d.ts",
34
+ "import": "./dist/module.mjs",
35
+ "require": "./dist/module.cjs"
36
+ }
37
+ },
38
+ "main": "./dist/module.cjs",
39
+ "types": "./dist/types.d.ts",
40
+ "files": [
41
+ "dist"
42
+ ],
43
+ "scripts": {
44
+ "prepack": "nuxt-module-build",
45
+ "dev": "nuxi dev playground",
46
+ "dev:build": "nuxi build playground",
47
+ "dev:generate": "nuxi generate playground",
48
+ "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
49
+ "dev:preview": "nuxi preview playground",
50
+ "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
51
+ "lint": "eslint .",
52
+ "test": "vitest run",
53
+ "test:watch": "vitest watch"
54
+ },
55
+ "dependencies": {
56
+ "@nuxt/kit": "^3.2.3",
57
+ "openai": "^3.2.1"
58
+ },
59
+ "devDependencies": {
60
+ "@nuxt/eslint-config": "^0.1.1",
61
+ "@nuxt/module-builder": "^0.2.1",
62
+ "@nuxt/schema": "^3.2.3",
63
+ "@nuxt/test-utils": "^3.2.3",
64
+ "changelogen": "^0.5.1",
65
+ "eslint": "^8.36.0",
66
+ "nuxt": "^3.2.3",
67
+ "vitest": "^0.29.2"
68
+ }
69
+ }