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.
⚙️ 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.0.8 Here you will get Ollama's 10 model.
⚠️ 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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file npmai-0.0.8.tar.gz.
File metadata
- Download URL: npmai-0.0.8.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41f70da1522310f06493a0e414b2b47ed2157149001e17f3c39a78ef8883b4a1
|
|
| MD5 |
5af0c3ddffdedb29581ef2a9857f8c32
|
|
| BLAKE2b-256 |
12b487894e0afea72e8131b53ebd111b136dd7bced27468995be78ca95a572de
|
File details
Details for the file npmai-0.0.8-py3-none-any.whl.
File metadata
- Download URL: npmai-0.0.8-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af34f1e45f8ac83402f342369ebe376f45bc9d3ba15ed53d52feb4b2740f416d
|
|
| MD5 |
fff0adc14f799fb5a4f81f5d9837ed95
|
|
| BLAKE2b-256 |
bfe57cd1cc32a27ea54cc8cc3e7874afc2c15f0eb6d9daebc100b40a236802d8
|