ollama/README.md

67 lines
899 B
Markdown
Raw Normal View History

2023-06-27 03:57:13 +08:00
# ollama
2023-06-23 00:45:31 +08:00
2023-06-26 01:08:03 +08:00
🙊
## Running
Install dependencies:
2023-06-23 00:45:31 +08:00
```
2023-06-26 01:08:03 +08:00
pip install -r requirements.txt
2023-06-23 00:45:31 +08:00
```
2023-06-26 01:08:03 +08:00
Put your model in `models/` and run:
```
2023-06-27 03:57:13 +08:00
python3 ollama.py serve
2023-06-26 01:08:03 +08:00
```
To run the app:
```
cd desktop
npm install
npm start
```
## Building
If using Apple silicon, you need a Python version that supports arm64:
```bash
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh
```
Get the dependencies:
```bash
pip install -r requirements.txt
```
2023-06-26 01:10:15 +08:00
Then build a binary for your current platform:
2023-06-26 01:08:03 +08:00
```bash
python3 build.py
```
2023-06-26 01:10:15 +08:00
### Building the app
2023-06-26 01:08:03 +08:00
```
cd desktop
npm run package
```
## API
2023-06-26 02:29:26 +08:00
### `GET /models`
Returns a list of available models
2023-06-26 01:08:03 +08:00
### `POST /generate`
2023-06-26 02:29:26 +08:00
Generates completions as a series of JSON objects
2023-06-26 01:08:03 +08:00
model: `string` - The name of the model to use in the `models` folder.
prompt: `string` - The prompt to use.