nuxt-ollama 1.0.7 → 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 +103 -103
- package/dist/module.json +1 -1
- package/dist/runtime/server/tsconfig.json +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,103 +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
|
-
- [✨ Release Notes](/CHANGELOG.md)
|
|
13
|
-
|
|
14
|
-
- [🏀 Online playground](https://stackblitz.com/github/jericho1060/nuxt-ollama?file=playground%2Fapp.vue)
|
|
15
|
-
|
|
16
|
-
- [📖 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
|
|
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
|
+
- [✨ Release Notes](/CHANGELOG.md)
|
|
13
|
+
|
|
14
|
+
- [🏀 Online playground](https://stackblitz.com/github/jericho1060/nuxt-ollama?file=playground%2Fapp.vue)
|
|
15
|
+
|
|
16
|
+
- [📖 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
|
@@ -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.
|
|
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.
|
|
38
|
+
"ollama": "^0.5.8"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@nuxt/devtools": "^1.3.9",
|