Skip to main content

Noir-LLM

DISCLAIMER: This package is for educational purposes only. Use at your own risk. See the Disclaimer section for more details.

A Python package for accessing various LLM models freely and using them in your projects.

PyPI version License: MIT

Features

  • Access to multiple LLM models through a unified API
  • Web search capabilities for supported models
  • System prompt customization
  • Command-line interface for interactive chat sessions
  • Simple Python API for integration into your projects
  • User agent rotation for bypassing rate limits

Installation

pip install noir-llm

Quick Start

Command-Line Interface

List available models:

noir-llm list

Start an interactive chat session:

noir-llm chat

Start a chat session with a specific model:

noir-llm chat --model glm-4-32b
# or
noir-llm chat --model mistral-31-24b
# or
noir-llm chat --model gpt-3.5-turbo
# or
noir-llm chat --model claude-3-7-sonnet

Enable web search for the chat session:

noir-llm chat --model glm-4-32b --websearch
# or
noir-llm chat --model mistral-31-24b --websearch

Send a single message:

noir-llm send "What is the capital of France?" --model glm-4-32b
# or
noir-llm send "What is the capital of France?" --model llama-3.2-3b
# or
noir-llm send "What is the capital of France?" --model gpt-3.5-turbo
# or
noir-llm send "What is the capital of France?" --model claude-3-7-sonnet

Python API

from noir import NoirClient

# Create a client
client = NoirClient()

# List available models
models = client.get_available_models()
print(f"Available models: {models}")

# Select a model
client.select_model("glm-4-32b")
# or
# client.select_model("mistral-31-24b")
# or
# client.select_model("gpt-3.5-turbo")
# or
# client.select_model("claude-3-7-sonnet")

# Set a system prompt
client.set_system_prompt("You are a helpful assistant.")

# Send a message
response = client.send_message("What is the capital of France?")
print(f"Response: {response}")

# Enable web search
response = client.send_message("What are the latest developments in quantum computing?", websearch=True)
print(f"Response with web search: {response}")

Available Models

  • GLM-4-32B: A powerful language model with web search capabilities
  • Z1-32B: Another powerful language model with web search capabilities
  • Z1-Rumination: A model optimized for deep research and analysis
  • Mistral-31-24B: A high-quality language model from Venice AI with web search capabilities
  • Llama-3.2-3B: A compact but powerful model from Venice AI with web search capabilities
  • GPT-3.5-Turbo: OpenAI's GPT-3.5 model with fast response times and good general capabilities
  • Claude-3-7-Sonnet: Anthropic's Claude 3.7 Sonnet model with advanced reasoning capabilities

User Agent Utilities

Noir provides utilities for rotating user agents to help bypass rate limits when making requests to model APIs:

from noir.utils import get_random_user_agent, get_desktop_user_agent, get_mobile_user_agent

# Get a random user agent
user_agent = get_random_user_agent()

# Get a random desktop user agent
desktop_agent = get_desktop_user_agent()

# Get a random mobile user agent
mobile_agent = get_mobile_user_agent()

# Use with requests
import requests
session = requests.Session()
headers = {
    "User-Agent": get_random_user_agent(),
    "Accept": "text/html,application/xhtml+xml,application/xml"
}
response = session.get("https://example.com", headers=headers)

The user agent list is fetched from a comprehensive database of real browser user agents, ensuring a wide variety of options for rotation.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Disclaimer

IMPORTANT: This package is provided for educational purposes only. Use at your own risk. The package accesses third-party APIs without official authorization, which may violate terms of service of the respective providers. The authors are not responsible for any consequences resulting from the use of this package, including but not limited to account suspensions, legal actions, or any other damages.

By using this package, you acknowledge that:

  • You are using it solely for educational and research purposes
  • You understand the potential risks involved
  • You take full responsibility for any consequences that may arise from its use

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for noir-llm 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for noir-llm 0.2.6
File Size Uploaded Provenance
noir_llm-0.2.6.tar.gz 22.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for noir-llm 0.2.6
File Interpreter ABI Platform
noir_llm-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 53.7 kB

Release files / noir_llm-0.2.6.tar.gz

Download URL noir_llm-0.2.6.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9a39e546fce543223da2c2f77a3017016701f197197c04a53ed7e80dcdc8fdda
BLAKE2b-256 checksum
How to use checksums
7602b3d95a7ac717b50fe4d79030e3911d8f17bfaa44d89278718d22571351fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Release files / noir_llm-0.2.6-py3-none-any.whl

Download URL noir_llm-0.2.6-py3-none-any.whl
Size 31.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b2a669107e8479610a35baaa35fee597f3ade65aa0b77f442b4dfd864804f10
BLAKE2b-256 checksum
How to use checksums
33be035f5ad65b9656a563fbe77ca14ab61d53d2f293837f9c7e0f18da49f594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Security for noir-llm 0.2.6

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page