LLM powered Python
Project description
Nerif
Program with both Python and Natural Language.
LLMs can be tricky to work with. They sometimes give overly formal responses or get confused when they're unsure, making them challenging to use in real applications.
That's why we built Nerif - a simple tool that connects LLMs with Python code. We want to make it better than existing tools like Langchain and Dify.
Nerif helps you:
- Control exactly how LLMs work in your code
- Convert LLM responses into usable data formats
- Track performance with metrics like cost and success rate
Our goal is to make LLMs easier to use for developers, turning complex AI capabilities into practical programming tools.
How to install
Pre-requisite
- Python >= 3.9
Install
pip install nerif
QuickStart
from nerif.core import nerif
from nerif.model import SimpleChatModel
model = SimpleChatModel()
# Use nerif judge "natural language statement"
if nerif("the sky is blue"):
print("True")
else:
# Call a simple model
print("No", end=", ")
print(model.chat("what is the color of the sky?"))
Documentation
More detailed documentation is on the official website.
License
Nerif is licensed under the GNU General Public License v3.0.
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
File details
Details for the file nerif-0.9.3.tar.gz
.
File metadata
- Download URL: nerif-0.9.3.tar.gz
- Upload date:
- Size: 44.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b4870998282627045669b024cdbe857ca30989a7a832373a8898ce7fde7979f |
|
MD5 | c0c9fdbf622c688d6b9d246ff3d3fc6d |
|
BLAKE2b-256 | fb3bbc1ed0ce06cde16366fc6f689d056e2452df18a721dc6e72a5d9a96727ca |
File details
Details for the file nerif-0.9.3-py3-none-any.whl
.
File metadata
- Download URL: nerif-0.9.3-py3-none-any.whl
- Upload date:
- Size: 39.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42e74a71b1f41cc626bd1692c011cb42d9e65a6342108945769299b2daf57432 |
|
MD5 | e91d4e70e2c9212b8b389380065efd17 |
|
BLAKE2b-256 | bf91e8320a59f0fe9ed2d16ddda48eb91a36c86ccfe38819260c38cbd7463944 |