ai_salom_x391
ai_salom_x391 is a Python package for a beautiful Uzbek-friendly AI chat CLI with automatic provider and model selection.
ai_salom_x391 - API kalit formatiga qarab providerni avtomatik aniqlaydigan, chiroyli CLI interfeysli, o'zbek tiliga mos AI chat paketi.
Features
- Google Gemini, OpenAI, Anthropic Claude, DeepSeek, and local Ollama support
- Automatic provider detection from API key format
- Automatic best-model selection
- Gemini default model:
gemini-2.0-flash - Default Uzbek ethical assistant system prompt
- Rich terminal UI with themes, welcome/status panel, header, command table, streaming markdown answers, prompt-toolkit multiline input, chat history browser, export, stats
- Persistent chat history is loaded automatically on startup
- Runtime theme switching with
/theme - Google Gemini uses the new
google-genaiSDK, with legacy fallback - Retry logic, streaming support, token and approximate cost tracking
- Thread-safe JSON history helpers
Installation
pip install .
For development:
pip install -r requirements.txt
pip install -e .
Environment Variables
You can pass API keys directly or set:
GEMINI_API_KEY=...
OPENAI_API_KEY=...
ANTHROPIC_API_KEY=...
DEEPSEEK_API_KEY=...
OLLAMA_BASE_URL=http://localhost:11434
Python Usage
Minimal usage:
import ai_salom_x391
ai_salom_x391.run(API_KEY="user_api_key")
Full usage:
ai_salom_x391.run(
API_KEY="user_api_key",
SYSTEM_PROMPT="Siz yordamchi AI...",
MODEL="auto",
PROVIDER="auto",
TEMPERATURE=0.7,
MAX_TOKENS=2048,
)
Beginner-friendly tuple style is also accepted:
ai_salom_x391.run(
API_KEY="AIza...",
PROVIDER="gemini",
MODEL=("MODEL", "gemini-3-flash-preview"),
)
Gemini:
ai_salom_x391.run(API_KEY="AIza...")
OpenAI:
ai_salom_x391.run(API_KEY="sk-...", PROVIDER="openai", MODEL="gpt-4")
Local Ollama:
ai_salom_x391.run(PROVIDER="ollama", MODEL="llama3")
CLI Usage
ai-salom --api-key "AIza..."
ai-salom --provider openai --model gpt-4 --api-key "sk-..."
ai-salom --provider ollama --model llama3
python -m ai_salom_x391 --provider ollama --model llama3
CLI commands:
/help Help
/clear Clear terminal
/model Show current provider and model
/switch provider:X Switch provider
/switch model:Y Switch model
/theme [name] List or switch themes: uzbek, minimal, cyber, dark
/history Show conversation history
/save [md|json|txt] Export conversation
/export [md|json|txt] Export conversation
/stats Show token and cost stats
/exit Exit
O'zbekcha qo'llanma
O'rnatish:
pip install .
Ishlatish:
import ai_salom_x391
ai_salom_x391.run(API_KEY="har_qanday_provider_api_kaliti")
Paket quyidagilarni avtomatik bajaradi:
- API key formatiga qarab providerni aniqlaydi
- Provider ichida eng yaxshi default modelni tanlaydi
- O'zbek tilidagi default system promptni yuboradi
- Chiroyli terminal chat interfeysini ochadi
- Suhbat tarixini saqlaydi va eksport qiladi
Ollama uchun API key kerak emas:
ai_salom_x391.run(PROVIDER="ollama", MODEL="llama3")
Tests
pytest
Integration tests are written with mocked provider calls, so they do not call paid APIs.
Metadata
Release files for ai-salom-x391 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_salom_x391-2.1.1.tar.gz | 17.5 kB | Without provenance | Details for ai_salom_x391-2.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_salom_x391-2.1.1-py3-none-any.whl | Python 3 | none | any | Details for ai_salom_x391-2.1.1-py3-none-any.whl |
Total release size: 37.7 kB
Release files / ai_salom_x391-2.1.1.tar.gz
| Download URL | ai_salom_x391-2.1.1.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6b627befb9c419cd889879c1c34c0badd674ac19cb5cb681f4ba14e42011c95
|
|
BLAKE2b-256 checksum How to use checksums |
6475f1bd379e45ecbfd098487350302c00fe049b180f2702352dc4b9ccaf494f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / ai_salom_x391-2.1.1-py3-none-any.whl
| Download URL | ai_salom_x391-2.1.1-py3-none-any.whl |
|---|---|
| Size | 20.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f007e27d98a36a60ba1ade17e82843dc239f54f55c31e5e9ca98db42ca518d8
|
|
BLAKE2b-256 checksum How to use checksums |
46f6cfbc3b8a2aca50e2c8cdac91dbcc4712c05d7f5f93fc4a443fd4ecf53e55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Security for ai-salom-x391 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.