Nav apraksta

Jeffrey Morgan df5fdd6647 `proto` -> `ollama` 1 gadu atpakaļ
desktop df5fdd6647 `proto` -> `ollama` 1 gadu atpakaļ
models d3709f85b5 build server into desktop app 1 gadu atpakaļ
.gitignore d34985b9df add templates to prompt command 1 gadu atpakaļ
LICENSE df5fdd6647 `proto` -> `ollama` 1 gadu atpakaļ
README.md df5fdd6647 `proto` -> `ollama` 1 gadu atpakaļ
build.py df5fdd6647 `proto` -> `ollama` 1 gadu atpakaļ
model_prompts.json e0543756b3 move prompt template to server 1 gadu atpakaļ
ollama.py df5fdd6647 `proto` -> `ollama` 1 gadu atpakaļ
requirements.txt b361fa72ec reorganize directories 1 gadu atpakaļ
template.py 93e0ffc9e0 move prompts to json file 1 gadu atpakaļ

README.md

ollama

🙊

Running

Install dependencies:

pip install -r requirements.txt

Put your model in models/ and run:

python3 ollama.py serve

To run the app:

cd desktop
npm install
npm start

Building

If using Apple silicon, you need a Python version that supports arm64:

wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh

Get the dependencies:

pip install -r requirements.txt

Then build a binary for your current platform:

python3 build.py

Building the app

cd desktop
npm run package

API

GET /models

Returns a list of available models

POST /generate

Generates completions as a series of JSON objects

model: string - The name of the model to use in the models folder. prompt: string - The prompt to use.