Bielik โ local Ollama chat client (CLI + web)
Project description
๐ฆ bielik
Author: Tom Sapletta
License: Apache-2.0
๐ต๐ฑ Bielik to lokalny klient chat do Ollama z interfejsem CLI i web, stworzony specjalnie dla polskiego modelu jฤzykowego Bielik od Speakleash.
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฆ
BIELIK โ
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโค
โ ๐ฅ๏ธ CLI Shell โ ๐ FastAPI Server โ ๐งช Test Suite โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโ โ
โ โ โข Interactive โโ โ โข REST /chat โ โ โ โข Unit tests โ โ
โ โ โข Help system โโ โ โข WebSocket /ws โ โ โ โข Mock API โ โ
โ โ โข Cross-platformโโ โ โข Port 8888 โ โ โ โข CI/CD โ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ CONNECTION LAYER โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ REST API (main) โโโโโบโ Ollama Library (fallback) โ โ
โ โ โโ HTTP requests โ โ โโ ollama.chat() โ โ
โ โ โโ /v1/chat/... โ โ โโ Direct integration โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฆ OLLAMA SERVER โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ ๐ localhost:11434 (default) โ
โ โ ๐ค Model: bielik (Polish LLM) โ
โ โ ๐ Links: Speakleash โ HuggingFace โ Ollama โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ค About Bielik Model
Bielik to przeลomowy polski model jฤzykowy stworzony przez Speakleash - fundacjฤ zajmujฤ cฤ siฤ rozwojem polskiej sztucznej inteligencji.
๐ External Dependencies & Links:
- Ollama - Local LLM runtime that hosts the Bielik model
- Bielik Model on HuggingFace - Official model repository
- Speakleash Foundation - Creators of the Bielik model
- Polish AI Initiative - Government support for Polish AI
๐ How it Works:
- Bielik package connects to your local Ollama server
- Ollama runs the Bielik model (downloaded from HuggingFace via Speakleash)
- Chat interface (CLI/Web) sends queries โ Ollama API โ Bielik model โ responses
- Fallback system ensures connectivity (REST API โ ollama library)
๐ Features
- ๐ฅ๏ธ CLI
bielikโ interactive chat shell with smart fallback system - ๐ Web server (FastAPI on port 8888):
POST /chatโ RESTful chat endpointWS /wsโ real-time WebSocket chat
- ๐ Dual connectivity โ REST API primary, ollama lib fallback
- ๐งช Full test coverage โ unit tests with mocked APIs
- ๐ง Developer tools โ Makefile automation, CI/CD ready
โ๏ธ Installation
pip install bielik
Optional dependency (official Ollama lib):
pip install "bielik[ollama]"
๐ Usage
CLI
bielik
Wpisz wiadomoลci, zakoลcz :exit.
Web API
uvicorn bielik.server:app --port 8888
- POST
/chat:
{"messages": [{"role":"user","content":"Hello!"}]}
- WebSocket
/ws
๐ง Environment Variables
OLLAMA_HOSTโ default:http://localhost:11434BIELIK_MODELโ default:bielik
๐ Development
git clone https://github.com/tomsapletta/bielik.git
cd bielik
python -m venv .venv
source .venv/bin/activate
pip install -e .[ollama]
๐ Struktura
bielik/
โโโ bielik/
โ โโโ __init__.py
โ โโโ cli.py
โ โโโ server.py
โโโ tests/
โ โโโ __init__.py
โ โโโ test_cli.py
โ โโโ test_server.py
โโโ pyproject.toml
โโโ setup.cfg
โโโ MANIFEST.in
โโโ LICENSE
โโโ README.md
โโโ Makefile
โโโ .github/workflows/python-publish.yml
๐ License
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
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 bielik-0.1.1.tar.gz.
File metadata
- Download URL: bielik-0.1.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b8587ada5f44be3277ccd693e48e587a8cfbe05cb9dcf613441643e7b59bd0d
|
|
| MD5 |
04a7201c5fcbe80442e39a4329088efc
|
|
| BLAKE2b-256 |
dbfbfd6cc7cffafa97a942a46f3aba14904519793d10e7122e78c9eecea898d0
|
File details
Details for the file bielik-0.1.1-py3-none-any.whl.
File metadata
- Download URL: bielik-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb66350945e37d39c72bc001c20ea64fc2c8c61f12a7f31a14f4b180f08d1675
|
|
| MD5 |
61738c419ff9616eee9b4c37d6c09105
|
|
| BLAKE2b-256 |
55ccd08868d8f9387fdfa69bfe228a119a2a8575cbf5b4996162c9ed86e5d9c7
|