An Applicaiton help to communicate with mongo using chatgpt and AI
Project description
MongoAgent 🧠🔍
MongoAgent is an AI-powered assistant that helps generate and execute MongoDB queries using OpenAI. It supports intelligent querying, CRUD operations, collection/documentation exploration, and metadata generation.
✨ Features
- Connect to MongoDB
- Auto-generate queries using OpenAI (GPT-3.5)
- CRUD operations on collections and documents
- Smart prompt handling for listing collections
- Auto-inferred schema from sample documents
- Optional verbose logging for debugging
- Extendable for aggregation and custom operations
How to install
pip install MongoAgent
How to use?
from MongoAgent import MongoAgent
agent = MongoAgent(mongoURL=..., openAI_token=..., db_name=...)
ai_query = agent.execute(prompt="show last 3 entries in logs table")
print("\n🤖 AI Response:\n", ai_query)
result = agent.execute_from_ai_query(ai_query)
print(result)
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
mongoagent-0.1.1.tar.gz
(3.6 kB
view details)
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 mongoagent-0.1.1.tar.gz.
File metadata
- Download URL: mongoagent-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
558beeec1c84f8d5482b4a66dac299cfd7af11f946ae5592608d43e18f692ef3
|
|
| MD5 |
c53b10c7a3b3808b3daee7e28a8744ce
|
|
| BLAKE2b-256 |
8dd05fa62189b61879fde77f42fe16fe52b13d527fabe4cfc046ee1c4f5e7825
|
File details
Details for the file mongoagent-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mongoagent-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bd7662091db6a87a41b0ed06f08ca6e42bb012af5b2d90907aba44dd77654ec
|
|
| MD5 |
6026a2008f5e26a9cecc9f6b9ae5ea1e
|
|
| BLAKE2b-256 |
7af01f6824bd7431bcbf2ef3a3e5d986170b2ca915d6254453886776c996c4c2
|