nuxt-ollama 1.0.2 → 1.0.3
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 +36 -35
- package/dist/module.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,44 +11,12 @@ You have to install Ollama to use this module. See [Official Website](https://ol
|
|
|
11
11
|
|
|
12
12
|
- [✨ Release Notes](/CHANGELOG.md)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- [🏀 Online playground](https://stackblitz.com/github/jericho1060/nuxt-ollama?file=playground%2Fapp.vue)
|
|
15
15
|
<!-- - [📖 Documentation](https://example.com) -->
|
|
16
|
-
|
|
17
|
-
## Features
|
|
18
|
-
|
|
19
|
-
- Vue 3 composable
|
|
20
|
-
- Server utils
|
|
21
|
-
|
|
22
|
-
usage on pages or server side:
|
|
23
|
-
```ts
|
|
24
|
-
const ollama = useOllama()
|
|
25
|
-
|
|
26
|
-
const response = await ollama.chat({
|
|
27
|
-
model: 'llama3.1',
|
|
28
|
-
messages: [{ role: 'user', content: 'Why is the sky blue?' }],
|
|
29
|
-
})
|
|
30
|
-
console.log(response.message.content)
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
See official [Ollama JavaScript Library documentation](https://github.com/ollama/ollama-js) for more information or examples.
|
|
34
|
-
|
|
35
|
-
## Settings
|
|
36
|
-
|
|
37
|
-
```ts
|
|
38
|
-
// nuxt.config.ts
|
|
39
|
-
export default defineNuxtConfig({
|
|
40
|
-
ollama: {
|
|
41
|
-
protocol: 'http', // or 'https'
|
|
42
|
-
host: 'localhost', //domain or ip address
|
|
43
|
-
port: 11434, // port
|
|
44
|
-
proxy: false, // use proxy
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
```
|
|
48
|
-
|
|
49
16
|
## Quick Setup
|
|
50
17
|
|
|
51
|
-
Install the module to your Nuxt application with one command:
|
|
18
|
+
Install the module to your Nuxt application with one command:
|
|
19
|
+
|
|
52
20
|
```bash
|
|
53
21
|
npx nuxi module add nuxt-ollama
|
|
54
22
|
```
|
|
@@ -84,6 +52,39 @@ export default {
|
|
|
84
52
|
|
|
85
53
|
That's it! You can now use Nuxt Ollama in your Nuxt app ✨
|
|
86
54
|
|
|
55
|
+
## Features
|
|
56
|
+
|
|
57
|
+
- Vue 3 composable
|
|
58
|
+
- Server utils
|
|
59
|
+
|
|
60
|
+
Usage on pages or server side:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
const ollama = useOllama()
|
|
64
|
+
|
|
65
|
+
const response = await ollama.chat({
|
|
66
|
+
model: 'llama3.1',
|
|
67
|
+
messages: [{ role: 'user', content: 'Why is the sky blue?' }],
|
|
68
|
+
})
|
|
69
|
+
console.log(response.message.content)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
See official [Ollama JavaScript Library documentation](https://github.com/ollama/ollama-js) for more information or examples.
|
|
73
|
+
|
|
74
|
+
## Settings
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
// nuxt.config.ts
|
|
78
|
+
export default defineNuxtConfig({
|
|
79
|
+
ollama: {
|
|
80
|
+
protocol: 'http', // or 'https'
|
|
81
|
+
host: 'localhost', //domain or ip address
|
|
82
|
+
port: 11434, // port
|
|
83
|
+
proxy: false, // use proxy
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
```
|
|
87
|
+
|
|
87
88
|
## Contribution
|
|
88
89
|
|
|
89
90
|
Contributions are welcome, feel free to open an issue or submit a pull request!
|
package/dist/module.json
CHANGED