DotAI - Natural Language Programming Language
Project description
🤖 DotAI - Natural Language Programming Language
DotAI is a revolutionary natural language programming framework that allows you to write code and create content using plain English. Simply describe what you want to create, and DotAI will generate, save, and execute the appropriate files.
✨ Features
- 📝 Write code in natural language
- 🔄 Automatic code generation and execution
- 📊 Multi-threaded task processing
- 🛠 Enterprise-grade error handling
- 📋 Supports multiple output formats
- 📜 Comprehensive logging system
🚀 Quick Start
Installation
pip3 install ai-lang
Create Your First .ai File
Create a file example.ai
with your requests:
Create a Python function that generates the Fibonacci sequence up to n=10 and prints it.
Create a text file containing a haiku about programming.
Create a JSON file with data about three planets including their name, distance from sun, and mass.
Run Your .ai File
from ai_lang.ai_lang import process_ai_file_sync
from loguru import logger
import sys
try:
results = process_ai_file_sync("test.ai")
logger.info(f"Successfully processed {len(results)} requests")
except Exception as e:
logger.exception(f"Failed to process file: {e}")
sys.exit(1)
📖 Usage Examples
1. Generate and Execute Python Code
# script.ai
Create a Python script that:
1. Generates 100 random numbers
2. Calculates their mean and standard deviation
3. Creates a histogram visualization
Execute the script and show the results.
2. Create Content Files
# content.ai
Write a technical blog post about the future of AI in software development.
Save it as a markdown file with proper formatting.
3. Data Processing
# data.ai
Create a Python script that reads a CSV file, performs data cleaning,
and outputs summary statistics. Include error handling for missing values.
Execute the script with sample data.
🛠 Advanced Features
- Multi-threading: Process multiple requests in parallel
- Smart Task Analysis: Automatic detection of task type and requirements
- Execution Management: Safe execution environment for generated code
- Comprehensive Logging: Detailed logs for debugging and monitoring
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git clone https://github.com/The-Swarm-Corporation/.ai.git
cd .ai
pip install -e ".[dev]"
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links
💡 Examples Repository
Check out our examples repository for more use cases and implementation patterns.
⚠️ Note
DotAI requires an OpenAI API key to function. Set your API key as an environment variable:
export OPENAI_API_KEY='your-api-key-here'
Or use a .env
file in your project directory:
OPENAI_API_KEY=your-api-key-here
Made with ❤️ by the DotAI Team
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
Built Distribution
File details
Details for the file ai_lang-0.0.3.tar.gz
.
File metadata
- Download URL: ai_lang-0.0.3.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff83b71945557df7a3eb06c5b7552b349cda349191bce235c2b2fe3e01341449 |
|
MD5 | 121bdb4637b1d833599e4b6957c8dea6 |
|
BLAKE2b-256 | cb5d4e12fb4d658eb55c889aad8ebc199ff1a141ba4843f06d8429b5660b30b1 |
File details
Details for the file ai_lang-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: ai_lang-0.0.3-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78bc25c49254083e761944c50a3a71df9471138d3327242c3f771a8c42febfd0 |
|
MD5 | 03d828265ba05478a82b52a059211bcc |
|
BLAKE2b-256 | c8defecde564aa96e2537df184dd00d9d407530cc24fb421fe7d89127913e289 |