Skip to main content

A lightweight Selenium-based LangChain-compatible multi-LLM bridge (Gemini, ChatGPT, Grok, Perplexity,Image_Model,GeminiAIMode) built by Sonu Kumar.

Project description

npmai

npmai (by Sonu Kumar Ramashish) is a lightweight Python package that seamlessly connects LangChain with real-time web-based LLMs like Gemini, ChatGPT, Grok, Mistral and Perplexity via Selenium automation.

🚀 Features

Execute prompts on multiple LLMs simultaneously: Gemini, ChatGPT, Grok, Perplexity, Mistral.

Fully LangChain-compatible interface.

Simple and intuitive invoke() API for instant responses.

Browser automation with headless Chrome via Selenium.

Supports continuous conversation mode for long-running interactions with ChatGPT or Gemini.

Encourages responsible usage—please respect AI companies like OpenAI, Google, X AI, Perplexity, Mistral and support them if used at scale.

⚙️ 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 you need—either one, two, or all:

from npmai import ChatGPT, Grok, Perplexity, Gemini, GeminiAIMode,Image,Mistral

Initialize a model:

llm = ChatGPT() # or Gemini(), Grok(), Perplexity(),Image(),Mistral()

Invoke a prompt and get the response:

response = llm.invoke("Your prompt here") print(response)

#Latest Update : version 0.0.6 Here you will get Mistral also.

⚠️ Important Notes

Designed for educational and small-scale experimentation.

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

Continuous mode allows extended conversations, but use responsibly to avoid overloading web-based LLM services.

✅ npmai makes it effortless to connect web-based AI models with Python, bringing automation, experimentation, and LangChain 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.0.6.tar.gz (5.2 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.0.6-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for npmai-0.0.6.tar.gz
Algorithm Hash digest
SHA256 71985f98957a28fffb2e0f54d3a0243e2fb6e6237c5a53fbdfcd12bdd8d0b590
MD5 560b4e50f96e1390280e09b619bc0b0f
BLAKE2b-256 b854880d452d978792cfa12d3881d22c9d3fb0b3ab19bef2f0117a023e069760

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npmai-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.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.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 890eedf8368eab0fec1f25d10dc188cbc070f330b88dbfef0cbcfa139d045790
MD5 6261e3d82fa45da14d242606e0710c3a
BLAKE2b-256 2fc006465c00110ca3bccae5e44f40820546bdd8295d5945b3d254ea3ae263b9

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