LLM powered Python
Project description
Nerif
Program with both Python and Natural Language.
Using Large Language Models (LLMs) can often yield unpredictable results. They may produce excessively polite responses that, while technically correct, don't always align with the context. When faced with uncertainty, LLMs might display human-like confusion, offering detailed explanations of their thought processes instead of clear answers—an approach that isn't always useful for end-users.
To tackle these challenges, we're excited to introduce Nerif. This tool seamlessly integrates LLMs with Python programming, aiming to set a new standard in AI-driven development. Our goal is not only to match but potentially surpass existing frameworks like Langchain, Dify, and other leading AI agent programming methodologies.
Our objectives with Nerif are clear:
- Empower developers to harness LLMs in their projects exactly as they envision.
- Ensure that LLM outputs are properly formatted into programmable types for seamless integration.
- Introduce innovative metrics like token_cost and pass_rate to help developers refine the quality of their AI agents' prompts.
By focusing on these key points, we aim to significantly enhance the utility and efficiency of LLMs in programming environments, making them more accessible and effective for developers worldwide.
How to install
Pre-requisite
- Python >= 3.9
Install
pip install nerif
QuickStart
from nerif.agent import SimpleChatAgent
from nerif.core import nerif
# Use nerif judge "natural language statement"
if nerif("the sky is blue"):
print("True")
else:
print("No", end=", ")
# Call a simple agent
agent = SimpleChatAgent()
print(agent.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.0.tar.gz
.
File metadata
- Download URL: nerif-0.9.0.tar.gz
- Upload date:
- Size: 45.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b09279e5e927355cf50aab159a813c4c9576c36cbaf849920597c6fe8d14181a |
|
MD5 | f8e57011a9cf2b4fd648d3714e07605a |
|
BLAKE2b-256 | f31e22ffc9b34d673a275da745cfe2497f2a3e60bf9340c0f272c6d3937cb666 |
File details
Details for the file nerif-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: nerif-0.9.0-py3-none-any.whl
- Upload date:
- Size: 39.6 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 | 2b7d79537a7435fcc892a892d1cc5d845ce96c490d91c56b813426bab0793720 |
|
MD5 | 2931664d2b0b8ed945105dbb20f74e6f |
|
BLAKE2b-256 | bf9071e06d818755245efbbd7facb6262427e2746f4a1bc3934e902538113850 |