yllm-chat
A simple CLI tool for chatting with OpenAI-compatible APIs.
Installation
pip install yllm-chat
Usage
Command Line
# Direct message
yllm "Explain Python decorators"
# With custom system prompt
yllm -s "You are a Python expert" "What are generators?"
# Pipe input
echo "Summarize this" | yllm
# Disable streaming
yllm --no-stream "Hello"
As a Library
from yllm import chat_with_openai
# Streaming (prints to stdout)
chat_with_openai("Hello, world!")
# Non-streaming (returns string)
response = chat_with_openai("Hello", stream=False)
print(response)
Configuration
Set these environment variables (or use a .env file):
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY |
Yes | Your API key |
OPENAI_BASE_URL |
No | Custom API endpoint (for OpenAI-compatible APIs) |
OPENAI_MODEL |
No | Model to use (default: gpt-4o-mini) |
Development
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check .
License
MIT
Metadata
Release files for yllm-chat 0.1.0
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 | |
|---|---|---|---|---|
| yllm_chat-0.1.0.tar.gz | 3.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yllm_chat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / yllm_chat-0.1.0.tar.gz
| Download URL | yllm_chat-0.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75b9ac7f7541263825ab67fcfb86e722022b786684d2510f253380974ff00a2e
|
|
BLAKE2b-256 checksum How to use checksums |
c5a5ea4dbb15edfd55cd5cb3191f72e6d791094689694576e5b2d80d5e2be077
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.6
|
Release files / yllm_chat-0.1.0-py3-none-any.whl
| Download URL | yllm_chat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1340ecc10a869d92e94c985ec2c5e5859aee46472209894fc41e95f045b784ba
|
|
BLAKE2b-256 checksum How to use checksums |
29be76677b5b65b2f3b9d8a5aac7ab0aef764fece990c6b2cbb2f8c9af2e9e1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.6
|
Security for yllm-chat 0.1.0
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.