
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
text2sql-ltm
Advanced tools
Text2SQL-LTM is a comprehensive Text-to-SQL library, featuring cutting-edge AI capabilities. Built with production-ready architecture and to push the boundaries of what's possible in natural language to SQL conversion.
pip install text2sql-ltm
import asyncio
from text2sql_ltm import create_simple_agent, Text2SQLSession
async def main():
# Just provide your API key - everything else uses smart defaults
agent = create_simple_agent(api_key="your_openai_key")
async with Text2SQLSession(agent) as session:
result = await session.query(
"Show me the top 10 customers by revenue this year",
user_id="user123"
)
print(f"Generated SQL: {result.sql}")
print(f"Confidence: {result.confidence}")
print(f"Explanation: {result.explanation}")
asyncio.run(main())
# Enable advanced features with simple flags
agent = create_simple_agent(
api_key="your_openai_key",
enable_rag=True, # Vector-enhanced generation
enable_multimodal=True, # Voice + Image processing
enable_security_analysis=True, # Security scanning
enable_explanation=True, # AI teaching
enable_test_generation=True # Automated testing
)
from text2sql_ltm import create_integrated_agent
# Load from configuration file
agent = create_integrated_agent(config_file="config/production.yaml")
# Or use configuration dictionary
agent = create_integrated_agent(config_dict={
"memory": {
"storage_backend": "postgresql",
"storage_url": "postgresql://user:pass@localhost/db"
},
"agent": {
"llm_provider": "openai",
"llm_model": "gpt-4",
"llm_api_key": "your_api_key"
},
"ai_features": {
"enable_rag": True,
"enable_validation": True,
"enable_multimodal": True,
"enable_security_analysis": True
}
})
# Process voice input
voice_result = await agent.multimodal_processor.process_voice_input(
audio_data=voice_bytes,
language="en-US"
)
# Process table image
image_result = await agent.multimodal_processor.process_image_input(
image_data=image_bytes,
image_type="table_screenshot"
)
# Combined processing
combined_result = await agent.multimodal_processor.process_multi_modal_input([
voice_input, image_input, text_input
])
# Comprehensive security analysis
security_result = await agent.security_analyzer.analyze_security(
query="SELECT * FROM users WHERE id = ?",
user_id="user123",
context={"user_input": True}
)
print(f"Security Score: {security_result.risk_score}/10")
print(f"Vulnerabilities: {len(security_result.vulnerabilities)}")
print(f"Compliance: {security_result.compliance_status}")
# Translate between database dialects
translation_result = await agent.query_translator.translate_query(
query="SELECT TOP 10 * FROM users",
source_dialect="sqlserver",
target_dialect="postgresql",
optimize_for_target=True
)
print(f"Original: {translation_result.original_query}")
print(f"Translated: {translation_result.translated_query}")
print(f"Compatibility: {translation_result.compatibility}")
# Generate comprehensive test suite
test_suite = await agent.test_generator.generate_test_suite(
query="SELECT name, COUNT(*) FROM users GROUP BY name",
schema=schema_info,
test_types=["functional", "edge_case", "performance", "security"]
)
print(f"Generated {len(test_suite.test_cases)} test cases")
| Feature | Text2SQL-LTM | Competitor A | Competitor B |
|---|---|---|---|
| Query Accuracy | 94.2% | 87.3% | 82.1% |
| Multi-Modal Support | ✅ Full | ❌ None | ⚠️ Limited |
| Security Analysis | ✅ Advanced | ⚠️ Basic | ❌ None |
| Learning System | ✅ AI-Powered | ❌ None | ❌ None |
| Schema Discovery | ✅ Automated | ⚠️ Manual | ⚠️ Manual |
| Cross-Platform | ✅ 8 Dialects | ⚠️ 3 Dialects | ⚠️ 2 Dialects |
| Test Generation | ✅ Automated | ❌ None | ❌ None |
| RAG Integration | ✅ Advanced | ❌ None | ⚠️ Basic |
Text2SQL-LTM features a modular, production-ready architecture:
text2sql_ltm/
├── core/ # Core engine and interfaces
├── memory/ # Long-term memory system
├── rag/ # RAG components
│ ├── retriever.py # Main RAG retriever
│ ├── schema_rag.py # Schema-specific RAG
│ ├── query_rag.py # Query pattern RAG
│ └── adaptive_rag.py # Self-improving RAG
├── ai_features/ # Advanced AI features
│ ├── sql_validator.py # AI-powered validation
│ ├── multimodal.py # Multi-modal processing
│ ├── explainer.py # Intelligent explanation
│ ├── schema_discovery.py # Schema analysis
│ ├── query_translator.py # Cross-platform translation
│ ├── security_analyzer.py # Security analysis
│ └── test_generator.py # Test automation
└── integrations/ # External integrations
# config/production.yaml
memory:
storage_backend: "postgresql"
storage_url: "${DATABASE_URL}"
agent:
llm_provider: "openai"
llm_model: "gpt-4"
llm_api_key: "${OPENAI_API_KEY}"
ai_features:
enable_rag: true
enable_validation: true
enable_multimodal: true
enable_security_analysis: true
rag:
vector_store:
provider: "pinecone"
api_key: "${PINECONE_API_KEY}"
embedding:
provider: "openai"
api_key: "${OPENAI_API_KEY}"
security:
require_authentication: true
rate_limiting_enabled: true
# Core API Keys
OPENAI_API_KEY=your_openai_key
DATABASE_URL=postgresql://user:pass@localhost/db
# Optional Services
PINECONE_API_KEY=your_pinecone_key
GOOGLE_VISION_API_KEY=your_google_key
REDIS_URL=redis://localhost:6379
Run the comprehensive test suite:
# Install with test dependencies
pip install text2sql-ltm[test]
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=text2sql_ltm --cov-report=html
# Run specific test categories
pytest tests/test_rag_system.py -v
pytest tests/test_multimodal.py -v
pytest tests/test_security.py -v
Comprehensive examples are available in the examples/ directory:
Text2SQL-LTM is a commercial product with advanced enterprise features.
For licensing, pricing, and enterprise support, contact:
Dr. Alban Maxhuni, PhD
📧 Email: info@albanmaxhuni.com
🌐 Website: albanmaxhuni.com
pip install text2sql-ltmText2SQL-LTM: Revolutionizing database interaction through advanced AI. 🚀
© 2024 Dr. Alban Maxhuni. All rights reserved.
FAQs
The most advanced Text-to-SQL library with revolutionary AI features
We found that text2sql-ltm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.