nuxt-ollama 1.0.6 → 1.0.9

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/README.md CHANGED
@@ -1,129 +1,103 @@
1
- # <img src="./nuxt-ollama.png" style="width:40px;"> Nuxt Ollama
2
-
3
- [![npm version][npm-version-src]][npm-version-href]
4
- [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
- [![License][license-src]][license-href]
6
- [![Nuxt][nuxt-src]][nuxt-href]
7
-
8
- Simple integration of the official Ollama JavaScript Library for your Nuxt application.
9
-
10
- You have to install Ollama to use this module. See [Official Website](https://ollama.com/download) to download it for your system.
11
-
12
- - [✨ &nbsp;Release Notes](/CHANGELOG.md)
13
-
14
- - [🏀 Online playground](https://stackblitz.com/github/jericho1060/nuxt-ollama?file=playground%2Fapp.vue)
15
- <!-- - [📖 &nbsp;Documentation](https://example.com) -->
16
-
17
- ## Quick Setup
18
-
19
- Install the module to your Nuxt application with one command:
20
-
21
- ```bash
22
- npx nuxi module add nuxt-ollama
23
- ```
24
-
25
- <details>
26
- <summary>Or install it with your favorite package manager:</summary>
27
-
28
- ```bash
29
- # NPM:
30
- npm install nuxt-ollama
31
-
32
- # PNPM:
33
- pnpm add nuxt-ollama
34
-
35
- # Yarn:
36
- yarn add nuxt-ollama
37
-
38
- # Bun
39
- bun add nuxt-ollama
40
- ```
41
-
42
- Add `nuxt-ollama` to the `modules` section of `nuxt.config.js`:
43
-
44
- ```ts
45
- // nuxt.config.ts
46
- export default {
47
- modules: [
48
- 'nuxt-ollama',
49
- ],
50
- }
51
- ```
52
- </details>
53
-
54
- That's it! You can now use Nuxt Ollama in your Nuxt app ✨
55
-
56
- ## Features
57
-
58
- - Vue 3 composable
59
- - Server utils
60
-
61
- Usage on pages or server side:
62
-
63
- ```ts
64
- const ollama = useOllama()
65
-
66
- const response = await ollama.chat({
67
- model: 'llama3.1',
68
- messages: [{ role: 'user', content: 'Why is the sky blue?' }],
69
- })
70
- console.log(response.message.content)
71
- ```
72
-
73
- See official [Ollama JavaScript Library documentation](https://github.com/ollama/ollama-js) for more information or examples.
74
-
75
- ## Settings
76
-
77
- ```ts
78
- // nuxt.config.ts
79
- export default defineNuxtConfig({
80
- //...
81
- ollama: {
82
- protocol: 'http', // or 'https'
83
- host: 'localhost', //domain or ip address
84
- port: 11434, // port
85
- proxy: false, // use proxy
86
- }
87
- })
88
- ```
89
-
90
- ## Contribution
91
-
92
- Contributions are welcome, feel free to open an issue or submit a pull request!
93
-
94
- *guidelines coming soon*
95
-
96
- <details>
97
- <summary>Local development</summary>
98
-
99
- ```bash
100
- # Install dependencies
101
- npm install
102
-
103
- # Generate type stubs
104
- npm run dev:prepare
105
-
106
- # Develop with the playground
107
- npm run dev
108
- ```
109
-
110
- </details>
111
-
112
-
113
- <!-- Badges -->
114
-
115
- [npm-version-src]: https://img.shields.io/npm/v/nuxt-ollama/latest.svg?style=flat&colorA=020420&colorB=00DC82
116
-
117
- [npm-version-href]: https://npmjs.com/package/nuxt-ollama
118
-
119
- [npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-ollama.svg?style=flat&colorA=020420&colorB=00DC82
120
-
121
- [npm-downloads-href]: https://npmjs.com/package/nuxt-ollama
122
-
123
- [license-src]: https://img.shields.io/npm/l/nuxt-ollama.svg?style=flat&colorA=020420&colorB=00DC82
124
-
125
- [license-href]: https://npmjs.com/package/nuxt-ollama
126
-
127
- [nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
128
-
129
- [nuxt-href]: https://nuxt.com
1
+ # <img src="./nuxt-ollama.png" style="width:40px;"> Nuxt Ollama
2
+
3
+ [![npm version][npm-version-src]][npm-version-href]
4
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
+ [![License][license-src]][license-href]
6
+ [![Nuxt][nuxt-src]][nuxt-href]
7
+
8
+ Simple integration of the official Ollama JavaScript Library for your Nuxt application.
9
+
10
+ You have to install Ollama to use this module. See [Official Website](https://ollama.com/download) to download it for your system.
11
+
12
+ - [✨ &nbsp;Release Notes](/CHANGELOG.md)
13
+
14
+ - [🏀 Online playground](https://stackblitz.com/github/jericho1060/nuxt-ollama?file=playground%2Fapp.vue)
15
+
16
+ - [📖 &nbsp;Documentation](https://nuxt-ollama.jericho.dev/)
17
+
18
+ ## Quick Setup
19
+
20
+ Install the module to your Nuxt application with one command:
21
+
22
+ ```bash
23
+ npx nuxi module add nuxt-ollama
24
+ ```
25
+
26
+ That's it! You can now use Nuxt Ollama in your Nuxt app
27
+
28
+ ## Features
29
+
30
+ - Vue 3 composable
31
+ - Server utils
32
+
33
+ ## Usage
34
+
35
+ Usage on pages or server side:
36
+
37
+ ```ts
38
+ const ollama = useOllama()
39
+
40
+ const response = await ollama.chat({
41
+ model: 'llama3.1',
42
+ messages: [{ role: 'user', content: 'Why is the sky blue?' }],
43
+ })
44
+ console.log(response.message.content)
45
+ ```
46
+
47
+ See [documentation](https://nuxt-ollama.jericho.dev/) for more information or examples.
48
+
49
+ ## Settings
50
+
51
+ ```ts
52
+ // nuxt.config.ts
53
+ export default defineNuxtConfig({
54
+ //...
55
+ ollama: {
56
+ protocol: 'http', // or 'https'
57
+ host: 'localhost', //domain or ip address
58
+ port: 11434, // port
59
+ proxy: false, // use proxy
60
+ }
61
+ })
62
+ ```
63
+
64
+ ## Contribution
65
+
66
+ Contributions are welcome, feel free to open an issue or submit a pull request!
67
+
68
+ *guidelines coming soon*
69
+
70
+ <details>
71
+ <summary>Local development</summary>
72
+
73
+ ```bash
74
+ # Install dependencies
75
+ npm install
76
+
77
+ # Generate type stubs
78
+ npm run dev:prepare
79
+
80
+ # Develop with the playground
81
+ npm run dev
82
+ ```
83
+
84
+ </details>
85
+
86
+
87
+ <!-- Badges -->
88
+
89
+ [npm-version-src]: https://img.shields.io/npm/v/nuxt-ollama/latest.svg?style=flat&colorA=020420&colorB=00DC82
90
+
91
+ [npm-version-href]: https://npmjs.com/package/nuxt-ollama
92
+
93
+ [npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-ollama.svg?style=flat&colorA=020420&colorB=00DC82
94
+
95
+ [npm-downloads-href]: https://npmjs.com/package/nuxt-ollama
96
+
97
+ [license-src]: https://img.shields.io/npm/l/nuxt-ollama.svg?style=flat&colorA=020420&colorB=00DC82
98
+
99
+ [license-href]: https://npmjs.com/package/nuxt-ollama
100
+
101
+ [nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
102
+
103
+ [nuxt-href]: https://nuxt.com
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.12"
6
6
  },
7
- "version": "1.0.6",
7
+ "version": "1.0.9",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.1",
10
10
  "unbuild": "2.0.0"
@@ -1,3 +1,3 @@
1
- {
2
- "extends": "../../../.nuxt/tsconfig.server.json",
3
- }
1
+ {
2
+ "extends": "../../../.nuxt/tsconfig.server.json",
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-ollama",
3
- "version": "1.0.6",
3
+ "version": "1.0.9",
4
4
  "description": "Easy ollama integration for Nuxt",
5
5
  "repository": "jericho1060/nuxt-ollama",
6
6
  "license": "MIT",
@@ -35,7 +35,7 @@
35
35
  "dependencies": {
36
36
  "@nuxt/kit": "^3.12.4",
37
37
  "defu": "^6.1.4",
38
- "ollama": "^0.5.6"
38
+ "ollama": "^0.5.8"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@nuxt/devtools": "^1.3.9",