Skip to main content

A lightweight Ollama(no ollama installation needed) based LangChain-compatible LLM bridge ('LLaMA-3.2','CodeLLaMA-Instruct 7B','Gemma-2-Instruct 9B','Mistral 7B Instruct','Qwen-2.5-Coder 7B','Phi-3 Medium (8B)','Falcon 7B Instruct','Baichuan-2-7B','InternLM-Chat-7B','Vicuna 7B') built by Sonu Kumar.

Project description

npmai

npmai (by Sonu Kumar Ramashish) is a lightweight Python package that seamlessly connects you with Ollama and other open-source models without any Installation, Login/Signup or API problems.

🚀 Features

Execute prompts on multiple LLMs simultaneously:["LLaMA-3.2","CodeLLaMA-Instruct 7B","Gemma-2-Instruct 9B","Mistral 7B Instruct","Qwen-2.5-Coder 7B","Phi-3 Medium (8B)","Falcon 7B Instruct","Baichuan-2-7B","InternLM-Chat-7B","Vicuna 7B"]

Fully LangChain,CrewAI and other -compatible interface.

Simple and intuitive invoke() API for instant responses.

Support continuous conversation.

Encourages responsible usage.

#For documentation visit:- https://npmai.onrender.com

⚙️ Installation pip install npmai

Tip: For Python 3.13, make sure to use:

py -3.13 -m pip install npmai

💡 How to Use

Import the models

from npmai import Ollama

Initialize Ollama:

llm = Ollama()

prompts="" model="Llama3.2" you can keep other also

Invoke a prompt and get the response:

response = llm.invoke(prompts,model) print(response)

#Latest Update : version 0.1.1 Here in this version we fixed the bug and added Structured_Output schemas.

⚠️ Important Notes

Designed for educational ,small-scale experimentation, for demo projets and small scale users.

If using at a larger scale, consider supporting the original AI platforms—they invest heavily in research and infrastructure.

use responsibly to help us.

✅ npmai makes it effortless to connect Ollam models with Python, bringing automation, experimentation, and LangChain,Crew AI integration together in a single, easy-to-use package.

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

npmai-0.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npmai-0.1.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file npmai-0.1.1.tar.gz.

File metadata

  • Download URL: npmai-0.1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for npmai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 377ed6fae9b09372e2b0c82a0775924a22b6b513f715ad2ba71ce688349a4dbc
MD5 3389c06003ad1993345499d877dc1c5d
BLAKE2b-256 beb02dacb2fdbd072308f4be4cb7709aa237f099605d5c04c2097df488e055e1

See more details on using hashes here.

File details

Details for the file npmai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: npmai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for npmai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 695c6e400102ee349f05db2bc7b9c72d7cc3ac00061a210306d968a2e42a3461
MD5 63096c3d961c5cfa179a9bfa7713f2bd
BLAKE2b-256 75f67bcfb0f1f6b1b6e8d9914486e85a69d80819a27421a4786f6e0ac316c266

See more details on using hashes here.

Supported by

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