FastAPI wrapper for running Ollama locally
Project description
Ollama FastAPI Wrapper
A simple FastAPI wrapper for Ollama models.
Installation
pip install ollama-fastapi
Usage
Run API server
ollama-fastapi
Call API
curl -X POST http://127.0.0.1:8000/generate \
-H "Content-Type: application/json" \
-d '{"prompt": "Write a haiku about FastAPI"}'
Use in Python
from ollama_fastapi.client import OllamaClient
ollama = OllamaClient("llama3")
print(ollama.generate("Hello world"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ollama_fastapi-0.1.1.tar.gz
(2.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ollama_fastapi-0.1.1.tar.gz.
File metadata
- Download URL: ollama_fastapi-0.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f8765f1d4aa118c8206d9f924340bd6f2824cc5506bb299f96a5a4c386570a6
|
|
| MD5 |
664bb98477b0d7b567f59650bb4e82f8
|
|
| BLAKE2b-256 |
6bbd8a9af3bb474e623c67b8704ec407401ae3f97f1936bbf3d644f2eeb3348f
|
File details
Details for the file ollama_fastapi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ollama_fastapi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bac82453ebe1cc4943631a9c1f2b5ae8590facd6549b75bb61fde8b051779035
|
|
| MD5 |
4853d1a3b5581a624fe62442b7be6051
|
|
| BLAKE2b-256 |
20e96667527851d6d9989e2871545349b8268d5d8f8c69bedfd4ab144932bb2d
|