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.

⚙️ 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.0 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


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.0.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.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: npmai-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 eeea90fdea60418d6775bad76bd28040db45f854755b554c75b3a83138fbfbb0
MD5 df0a4e6e97dd61504fe47e3c2b7a30b8
BLAKE2b-256 f79d3caf993cc029f7f012bf4b448d4962af69e07c87f1e294a0ccad203d5cac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npmai-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea502ad66596931c63b5a049c017fc44f022026d6f36b53a00ed7a192f12c26f
MD5 3d36a7f856ab7f44f7b2e9b696508754
BLAKE2b-256 6268172f235259bcccc10e12a5aa0988db117c3fe7feea84f2bd8d0e8f7659df

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