Skip to main content

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

agent = SimpleChatModel()

# Use nerif judge "natural language statement"
if nerif("the sky is blue"):
    print("True")
else:
    # Call a simple agent
    print("No", end=", ")
    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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nerif-0.9.1.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

nerif-0.9.1-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file nerif-0.9.1.tar.gz.

File metadata

  • Download URL: nerif-0.9.1.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for nerif-0.9.1.tar.gz
Algorithm Hash digest
SHA256 56a37cb0eec58b9d53ebcacb7c06fa599367ec65be7d8da4762bfb9576cb3f7a
MD5 22da95fa9960f61c40cb4e9f0bb8f5b3
BLAKE2b-256 c625aa97f695db4a28489f9e893e3cc64da4159196f89c06125aeac23057b04f

See more details on using hashes here.

File details

Details for the file nerif-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: nerif-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 39.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for nerif-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e6612b946ed9d60c0310804985aeac1783d05bcc1bf66099b6ef3ae5b099f40
MD5 d1a90e2c5d0550f4b26dfe8f1001d0d1
BLAKE2b-256 322ced6a0a9da7b1ce02af33f76e1a27834d10d0ca3f46264643e1c3c7543a38

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page