GLM4Free
A Python-only client for Z.AI (GLM) that allows you to interact with the LLM for free, requests only.
Features
- Python Only: No Node.js, Selenium, or heavy dependencies.
- Stream Support: Real-time streaming of AI responses.
- Thinking Mode: Toggle "Thinking" process (Chain of Thought).
- Web Search: Toggle capability to search the web.
- Image Generation: Toggle AI image generation features.
- CLI & API: Use it as a library or a command-line tool.
Installation
pip install glm4free
🎯 Usage
📖 As a Library
from GLM4Free.client import ZChat
# Initialize
bot = ZChat()
bot.initialize()
# Chat
print("AI: ", end="")
bot.chat("Hello! Who are you?")
# Enable Web Search or Image Gen
bot.use_web_search = True
bot.use_image_gen = True
bot.chat("Generate an image of a futuristic city.")
👥 CLI
You can run the chat interface directly from your terminal:
glm4free
🔧 Commands
Inside the CLI, you can use:
/search: Toggle Web Search (Turned off by default)/thinking: Toggle Thinking Mode (Turned on by default)/image: Toggle Image Generation (Turned off by default) (Does not work, only returning a prompt)/preview: Toggle Preview Mode (Useless) (Turned off by default)/new: Start a new conversation/history: View conversation history/exit: Quit
🚨Disclaimer
This is an unofficial client for educational purposes. It is not affiliated with Z.AI. Use responsibly.
🤝 Contributing
We welcome contributions! We are still missing upload functionality, feel free to pull request !
📄 License
This project is licensed under the MIT License.
💖 Support
If you find this project helpful:
- ⭐ Star this repository
- 🐛 Report issues
- 💡 Suggest new features
- 🤝 Contribute code
Enhanced using AI.
Metadata
Release files for glm4free 0.1.3
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 | |
|---|---|---|---|---|
| glm4free-0.1.3.tar.gz | 5.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| glm4free-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / glm4free-0.1.3.tar.gz
| Download URL | glm4free-0.1.3.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
666dc63cad4f22df51d090e2d99f4b3c6d8199b20dac9493ff051cc3135a5c74
|
|
BLAKE2b-256 checksum How to use checksums |
f248c43c4d1622591721b01edff45f83fa303a5d23e4c074cf53b8ed00fafa10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|
Release files / glm4free-0.1.3-py3-none-any.whl
| Download URL | glm4free-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bc1144aca0d0eeecd6aaaea167714ac42bff7c36ca366735a7de9f62fce2504
|
|
BLAKE2b-256 checksum How to use checksums |
67f9cd5be7a21faa38ed6f5e3a05a7d712a86be0ca6f9f497a9dca7fad9778f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|
Security for glm4free 0.1.3
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.