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.2.tar.gz
(3.7 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.2.tar.gz.
File metadata
- Download URL: mongoagent-0.1.2.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
784963fe6f0f479126993e6a5a1298d11b7a869e65f0efa8040d04acee5e08d8
|
|
| MD5 |
26e010bc15ccf6003d60cfa338139b6d
|
|
| BLAKE2b-256 |
a7169019b8d5527764439f06f970f5f577dbaac52893b33bd661ef1fc872a2d6
|
File details
Details for the file mongoagent-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mongoagent-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d645e9f5eea3525c8466466d71eeda7690ef19c0fb239e6981eb9fed3eb8ced
|
|
| MD5 |
1a13459431816d92ceebc95706696a72
|
|
| BLAKE2b-256 |
a4c730cdddf7d0d359a13b97aa8b3d95d7038d75f9f1df636e648471b6e27af8
|