A robust Rust-based microservice for analyzing and processing Excel sheets with advanced data manipulation capabilities and AI-powered insights.
- Excel file processing and analysis
- In-memory SQLite database for efficient data handling
- AI-powered data analysis using OpenAI's GPT models
- RESTful API for file upload and analysis
- Concurrent processing with tokio runtime
- Caching mechanism for improved performance
- Comprehensive error handling and logging
Ensure you have Rust installed (version 1.78.0 or later). If not, install it from https://rustup.rs/.
- Clone the repository:
git clone https://github.com/your-username/adapta_one_sheet_services.git
cd adapta_one_sheet_services
- Create a
.env
file in the project root and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
- Build the project:
cargo build --release
Start the server:
cargo run --release
The server will start on http://0.0.0.0:3001
. You can now send requests to the API endpoints.
Analyze an Excel file
Request body should include:
user_email
: Stringchat_id
: Stringmessages
: Array of stringsfiles
: Array of file information objects (including type and signed_url)
The application uses environment variables for configuration. Make sure to set the following:
OPENAI_API_KEY
: Your OpenAI API key for AI-powered analysis
You can adjust other configuration options in the Config struct within src/config.rs
.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch:
git checkout -b feature-branch-name
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature-branch-name
- Submit a pull request
Please ensure your code adheres to the existing style and passes all tests.
This project is licensed under the MIT License.
- Axum for the web framework
- Tokio for the asynchronous runtime
- Polars for data processing
- OpenAI for AI-powered analysis capabilities