Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/thoda-dev/nuxt-ollama. Simple integration of the official Ollama JavaScript Library for your Nuxt application.
···11+# Contributing to nuxt-ollama
22+33+Thank you for taking the time to contribute — we’re excited to collaborate with you! This project aims to be welcoming, kind, and inclusive. Whether you’re fixing a typo, filing a bug, improving docs, or adding features, your help is appreciated.
44+55+## 💛 Our guiding principles
66+- Be kind and respectful. Assume positive intent.
77+- Value all contributions, big and small.
88+- Communicate clearly and empathetically. Prefer constructive feedback.
99+- Be inclusive: use welcoming, gender‑neutral language and avoid sarcasm.
1010+- Celebrate learning. It’s okay to ask questions and to make mistakes.
1111+1212+We follow a simple Code of Conduct: no harassment, no discrimination, no personal attacks. If something makes you uncomfortable, please open a private issue or contact a maintainer.
1313+1414+## 🧭 Ways to contribute
1515+- Report bugs
1616+- Suggest enhancements
1717+- Improve documentation or examples
1818+- Write tests
1919+- Implement features (discuss first if non-trivial)
2020+2121+## 🐞 Bug reports
2222+Please include:
2323+- What happened and what you expected instead
2424+- Steps to reproduce (minimal repro if possible)
2525+- Environment: Node.js version, pnpm version, OS, Nuxt version
2626+- Logs or screenshots when relevant
2727+2828+Create a new issue and label it clearly. If you can, propose a hypothesis or a failing test.
2929+3030+## 💡 Feature requests
3131+Before starting work, open an issue to discuss:
3232+- The problem you’re solving and motivation
3333+- Proposed API/behavior (simple examples help)
3434+- Alternatives considered
3535+3636+We aim to keep the module simple and focused.
3737+3838+## 🛠️ Local development
3939+This repository is a Nuxt module with a playground for testing.
4040+4141+Prerequisites:
4242+- Node.js (project uses Volta pin: 24.11.0)
4343+- pnpm (packageManager: pnpm@10.20.0)
4444+4545+Common tasks:
4646+- Prepare module and playground
4747+ - pnpm run dev:prepare
4848+- Run the playground dev server
4949+ - pnpm run dev
5050+- Lint
5151+ - pnpm run lint
5252+- Type-check
5353+ - pnpm run test:types
5454+- Tests (Vitest)
5555+ - pnpm run test
5656+5757+Tip: If you add a new public option or server/composable utility, also update the types in `src/runtime/types/` as needed and add an example usage in `playground/`.
5858+5959+## 🧪 Tests
6060+- Add or update tests for behavior changes.
6161+- For fixes, consider writing a failing test first.
6262+- Keep tests fast and focused; prefer unit tests when possible.
6363+6464+## ✏️ Code style
6565+- Follow the existing ESLint and TypeScript setup (run `pnpm run lint` and `pnpm run test:types`).
6666+- Prefer small, focused PRs over large ones.
6767+- Keep public APIs documented (JSDoc or README snippets).
6868+6969+## 🧾 Commit messages
7070+We recommend Conventional Commits for clarity and changelog generation, for example:
7171+- feat: add XYZ option to runtime config
7272+- fix: handle missing model name in server util
7373+- docs: clarify playground setup
7474+- test: add unit tests for useOllama composable
7575+- refactor: simplify error handling
7676+7777+Prefix with `feat`, `fix`, `docs`, `test`, `refactor`, `chore`, etc. Use imperative mood and keep the subject short.
7878+7979+## 🌿 Branching and PRs
8080+- Create a topic branch from `master` (e.g. `feat/xyz`, `fix/edge-case`).
8181+- Keep PRs focused and include a short description of the change and motivation.
8282+- Checklist before opening a PR:
8383+ - [ ] Lint passes (`pnpm run lint`)
8484+ - [ ] Types pass (`pnpm run test:types`)
8585+ - [ ] Tests pass (`pnpm run test`)
8686+ - [ ] Docs updated (README/inline comments/playground if relevant)
8787+8888+We’ll review kindly and promptly. If changes are requested, they’re meant to help — we’re on the same team.
8989+9090+## 🔐 Security
9191+If you discover a vulnerability, please do not open a public issue. Instead, contact a maintainer privately so we can coordinate a fix.
9292+9393+## 📜 License and attribution
9494+By contributing, you agree that your contributions will be licensed under the MIT License of this repository.
9595+9696+## 🙏 Thank you
9797+Your time and energy make this project better for everyone. We’re grateful you’re here — welcome! ❤️
+19-2
README.md
···4343const ollama = useOllama()
44444545const response = await ollama.chat({
4646- model: 'llama3.1',
4646+ model: 'gpt-oss:120b',
4747 messages: [{ role: 'user', content: 'Why is the sky blue?' }],
4848})
4949console.log(response.message.content)
···5252See [documentation](https://nuxt-ollama.jericho.dev/) for more information or examples.
53535454## Settings
5555+5656+### Local models
55575658```ts
5759// nuxt.config.ts
···6668})
6769```
68707171+### - Cloud models with API key on https://ollama.com
7272+7373+```ts
7474+// nuxt.config.ts
7575+export default defineNuxtConfig({
7676+ //...
7777+ ollama: {
7878+ protocol: 'https', // or 'https'
7979+ host: 'ollama.com', //domain or ip address
8080+ api_key: 'your_api_key_here' // your Ollama API key
8181+ }
8282+})
8383+```
8484+8585+6986## Contribution
70877188Contributions are welcome, feel free to open an issue or submit a pull request!
72897373-*guidelines coming soon*
9090+Please see the [contributing guide](CONTRIBUTING.md) for details.
74917592<details>
7693 <summary>Local development</summary>