Skip to main content

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


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.8.1.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

nerif-0.8.1-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nerif-0.8.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.8.1.tar.gz
Algorithm Hash digest
SHA256 53263d02b6aade4790c51349961efd73144596380564e974819e0a0dcb4eeb52
MD5 0e8aca0ad32e6f74abd575f556eb1b53
BLAKE2b-256 fbc20c5973f4b095aec7b7f8582e80f3b37c4e3e93032338b4a595cf8b8f96ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nerif-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 39.0 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.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26c46a760148e3856f7adb91a0402d9748d0660563301463065fb9ba9930d578
MD5 38ea03c0eddedb38c2d6e1fb83aa0c2a
BLAKE2b-256 ad8190135209cbffc0b99bcc866b2665f934c3fe519965634abc3d3bf01dad4a

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