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, and Perplexity via Selenium automation.

🚀 Features

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

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, 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

Initialize a model:

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

Invoke a prompt and get the response:

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

#Latest Update : version 0.0.5 Here you will get models that can generate Images 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.5.tar.gz (4.5 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.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: npmai-0.0.5.tar.gz
  • Upload date:
  • Size: 4.5 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.5.tar.gz
Algorithm Hash digest
SHA256 9c61c7dc46b0633feef62bae001211c583ca6042196018619e2377c5b990a0bb
MD5 f898df5804286688997b69211536e620
BLAKE2b-256 1e1436a128b35e349869ba0b3cba2281e701ef433588262019a042b113c9e2d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npmai-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.8 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ba009d8e1561837c10d54cc151715e305467ac032deab865364672ade75703f2
MD5 70f5355fb7c9c5bde08a0ada652bb45e
BLAKE2b-256 ed2456921b9deeec886d95fbc7d5d7a524f5d67c4d88798af9e01175a2928fce

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