{"id":18187301,"url":"https://github.com/coslynx/openai-request-wrapper-mvp","last_synced_at":"2026-05-09T14:31:56.228Z","repository":{"id":260716177,"uuid":"882150063","full_name":"coslynx/OpenAI-Request-Wrapper-MVP","owner":"coslynx","description":"AI-powered tool simplifies OpenAI API requests and returns responses efficiently... Created at https://coslynx.com","archived":false,"fork":false,"pushed_at":"2024-11-02T02:27:28.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T16:19:18.713Z","etag":null,"topics":["ai-powered-api","api-development","asynchronous-programming","code-generation","developer-tools","devops","fastapi","language-model-access","machine-learning","mvp","mvp-development","openai-integration","openai-wrapper","postgresql","prompt-engine","python","python-backend","rest-api","software-development","sqlalchemy"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coslynx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-02T02:25:10.000Z","updated_at":"2024-11-02T02:27:32.000Z","dependencies_parsed_at":"2024-11-02T03:29:53.049Z","dependency_job_id":null,"html_url":"https://github.com/coslynx/OpenAI-Request-Wrapper-MVP","commit_stats":null,"previous_names":["coslynx/openai-request-wrapper-mvp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2FOpenAI-Request-Wrapper-MVP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2FOpenAI-Request-Wrapper-MVP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2FOpenAI-Request-Wrapper-MVP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2FOpenAI-Request-Wrapper-MVP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coslynx","download_url":"https://codeload.github.com/coslynx/OpenAI-Request-Wrapper-MVP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247661156,"owners_count":20975015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-powered-api","api-development","asynchronous-programming","code-generation","developer-tools","devops","fastapi","language-model-access","machine-learning","mvp","mvp-development","openai-integration","openai-wrapper","postgresql","prompt-engine","python","python-backend","rest-api","software-development","sqlalchemy"],"created_at":"2024-11-03T01:03:16.360Z","updated_at":"2026-05-09T14:31:56.166Z","avatar_url":"https://github.com/coslynx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv class=\"hero-icon\" align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/PKief/vscode-material-icon-theme/ec559a9f6bfd399b82bb44393651661b08aaf7ba/icons/folder-markdown-open.svg\" width=\"100\" /\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003e\nOpenAI-Request-Wrapper-MVP\n\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eA Python Backend Application for Simplifying OpenAI API Interactions\u003c/h4\u003e\n\u003ch4 align=\"center\"\u003eDeveloped with the software and tools below.\u003c/h4\u003e\n\u003cdiv class=\"badges\" align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Language-Python-blue\" alt=\"Programming Language: Python\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Framework-FastAPI-red\" alt=\"Framework: FastAPI\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Database-PostgreSQL-blue\" alt=\"Database: PostgreSQL\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/API-OpenAI-black\" alt=\"API: OpenAI\"\u003e\n\u003c/div\u003e\n\u003cdiv class=\"badges\" align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/last-commit/coslynx/OpenAI-Request-Wrapper-MVP?style=flat-square\u0026color=5D6D7E\" alt=\"git-last-commit\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/commit-activity/m/coslynx/OpenAI-Request-Wrapper-MVP?style=flat-square\u0026color=5D6D7E\" alt=\"GitHub commit activity\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/top/coslynx/OpenAI-Request-Wrapper-MVP?style=flat-square\u0026color=5D6D7E\" alt=\"GitHub top language\" /\u003e\n\u003c/div\u003e\n\n## 📑 Table of Contents\n- 📍 Overview\n- 📦 Features\n- 📂 Structure\n- 💻 Installation\n- 🏗️ Usage\n- 🌐 Hosting\n- 📄 License\n- 👏 Authors\n\n## 📍 Overview\n\nThis repository hosts the backend for the AI Powered OpenAI Request Wrapper MVP. It's a Python application designed to simplify interactions with OpenAI's powerful language models.  The MVP functions as a bridge between users and the OpenAI API, making it easier to leverage AI for diverse tasks. \n\n## 📦 Features\n\n| Feature           | Description                                                                                                        |\n|--------------------|--------------------------------------------------------------------------------------------------------------------|\n| Request Handling   | Accepts user requests for OpenAI API interactions, including model selection, prompt, and parameters.              |\n| API Call Generation | Translates user requests into properly formatted OpenAI API calls, ensuring accurate encoding of model selection, prompt, parameters, and authentication details. |\n| Response Processing | Parses and formats responses from the OpenAI API for easy understanding by the user, handling various response formats and extracting relevant information. |\n| Database Integration |  Stores API keys and user preferences in a PostgreSQL database for efficient and personalized interactions.    |\n| Authentication     | Uses JWTs for secure user authentication and authorization, ensuring safe access to the application and its resources. |\n\n## 📂 Structure\n\n```text\n├── commands.json        # Defines available commands for the application\n├── .env                # Stores environment variables securely\n├── README.md            # This file\n├── requirements.txt    # Lists all Python dependencies\n├── startup.sh         # Script for setting up the application environment\n├── main.py             # Main application entry point\n└── src\n    └── __init__.py       # Application initialization\n    └── routers\n        └── request_router.py  # Handles requests to the /request endpoint\n    └── services\n        └── openai_service.py  # Manages interactions with the OpenAI API\n    └── models\n        └── request.py      # Database model for storing requests and responses\n    └── schemas\n        └── request_schema.py # Pydantic schemas for validating API requests and responses\n    └── database\n        └── database.py     # Manages the database connection\n        └── models.py      # Defines the database models for the application\n    └── utils\n        └── logger.py       # Provides a centralized logging system\n    └── tests\n        └── test_openai_service.py  # Unit tests for the openai_service\n        └── test_request_router.py  # Unit tests for the request_router\n\n```\n\n## 💻 Installation\n\n### 🔧 Prerequisites\n\n- Python 3.9+\n- PostgreSQL 14+\n- Docker\n\n### 🚀 Setup Instructions\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/coslynx/OpenAI-Request-Wrapper-MVP.git\n   cd OpenAI-Request-Wrapper-MVP\n   ```\n2. **Install dependencies:**\n   ```bash\n   pip install -r requirements.txt\n   ```\n3. **Create the database:**\n   ```bash\n   createdb openai_request_wrapper\n   ```\n4. **Create the `pgcrypto` extension in the database:**\n   ```bash\n   psql -U postgres -d openai_request_wrapper -c \"CREATE EXTENSION IF NOT EXISTS pgcrypto\"\n   ```\n5. **Set up environment variables:**\n   ```bash\n   cp .env.example .env\n   ```\n   Replace placeholders in `.env` with your own values:\n   - `OPENAI_API_KEY`: Your OpenAI API key\n   - `DATABASE_URL`: Your PostgreSQL database connection string\n   - `JWT_SECRET`: Your secret key for JWT token generation\n\n## 🏗️ Usage\n\n### 🏃‍♂️ Running the Application\n\n1. **Start the application:**\n   ```bash\n   python main.py\n   ```\n\n## 🌐 Hosting\n\n### 🚀 Deployment Instructions\n\nFor deployment, consider using a platform like Heroku or AWS.\n\n**Heroku Deployment:**\n\n1. **Install Heroku CLI:**\n   ```bash\n   npm install -g heroku\n   ```\n2. **Login to Heroku:**\n   ```bash\n   heroku login\n   ```\n3. **Create a new Heroku app:**\n   ```bash\n   heroku create openai-request-wrapper-production\n   ```\n4. **Set up environment variables:**\n   ```bash\n   heroku config:set OPENAI_API_KEY=YOUR_OPENAI_API_KEY\n   heroku config:set DATABASE_URL=your_database_url_here\n   heroku config:set JWT_SECRET=your_secret_key\n   ```\n5. **Deploy the code:**\n   ```bash\n   git push heroku main\n   ```\n\n## 📄 License\n\nThis Minimum Viable Product (MVP) is licensed under the [GNU AGPLv3](https://choosealicense.com/licenses/agpl-3.0/) license.\n\n## 👏 Authors\n\n- Drix10 \n- Kais Radwan \n\n\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e🌐 CosLynx.com\u003c/h1\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eCreate Your Custom MVP in Minutes With CosLynxAI!\u003c/em\u003e\n\u003c/p\u003e\n\u003cdiv class=\"badges\" align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Developers-Drix10,_Kais_Radwan-red\" alt=\"\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Website-CosLynx.com-blue\" alt=\"\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Backed_by-Google,_Microsoft_\u0026_Amazon_for_Startups-red\" alt=\"\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Finalist-Backdrop_Build_v4,_v6-black\" alt=\"\"\u003e\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoslynx%2Fopenai-request-wrapper-mvp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoslynx%2Fopenai-request-wrapper-mvp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoslynx%2Fopenai-request-wrapper-mvp/lists"}