Skip to content

rooseveltframework/no-drama-ollama

Repository files navigation

🦙 no-drama-ollama npm

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.

Basic setup

  • 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 ci if you're not altering the dependency list or changing the versions of your dependencies.
    • Alternatively, use npm install if 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.
  • Run the app:

    • Use npm run production to run in production mode.
      • Available shorthands:
        • npm run prod
        • npm run p
        • npm start
    • Use npm run development to run in development mode.
      • Available shorthands:
        • npm run dev
        • npm run d
    • Use npm run production-proxy to run the app in production mode, but with localhostOnly set to true and hostPublic set 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 prodproxy
        • npm run x
    • See docs for more information about configuring and running Roosevelt apps.

Customize deployment

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.

Integrating into other web apps

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.

About

🦙 Minimalist web client for Ollama.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors