Minimalist web client for Ollama which focuses on being easy to setup, run, and embed in your web application with a highly customizable appearance. Can also be used as a standalone app as well.
-
Install prerequisites:
- Install Ollama to your system and ensure it is running.
- Install Node.js. Both the current and LTS version of Node.js are supported. It is recommended to use a Node.js version manager like nvm or nvm-windows rather than the official installer, as a version manager will allow you to switch between multiple versions of Node.js easily.
-
Clone this repo.
-
Install dependencies:
- Use
npm ciif you're not altering the dependency list or changing the versions of your dependencies. - Alternatively, use
npm installif you've altered the dependency list or changed the version of one of your dependencies. This is also necessary if you change the app's version number.
- Use
-
Run the app:
- Use
npm run productionto run in production mode.- Available shorthands:
npm run prodnpm run pnpm start
- Available shorthands:
- Use
npm run developmentto run in development mode.- Available shorthands:
npm run devnpm run d
- Available shorthands:
- Use
npm run production-proxyto run the app in production mode, but withlocalhostOnlyset to true andhostPublicset to false. This mode will make it so your app only listens to requests coming from localhost and does not serve anything in the public folder. This mode is useful when you want to host your app behind a reverse proxy from a web server like Apache or nginx and is considered a best practice for Node.js deployments.- Available shorthands:
npm run prodproxynpm run x
- Available shorthands:
- See docs for more information about configuring and running Roosevelt apps.
- Use
To set a global system prompt to provide the model context to use before answering, set the environment variable NO_DRAMA_OLLAMA_CONTEXT_FOLDER to a directory containing markdown (*.md) files with instructions for the model.
There are many ways to integrate no-drama-ollama into your web application.
One relatively straightforward way is to start no-drama-ollama as a child process from within your app, then proxy chat requests to the no-drama-ollama child process. See the sample app for a demo of how to do that in Node.js.
Another way to do it would be to run no-drama-ollama as a separate web service and use another web server to create a reverse proxy on the appropriate URLs instead of doing it from within your main application.