No description
- Python 100%
| app.py | ||
| README.md | ||
| requirements.txt | ||
| utils.py | ||
| wsgi.py | ||
Welcome to Azure-OpenAI-integration-with-db! This project utilizes Flask and Azure OpenAI to provide an interactive query system.
Getting Started
These instructions will guide you through setting up and running the project locally.
Prerequisites
- Azure OPENAI key, base_url etc
- Python 3.8 or higher
Installation
-
Clone this repository:
git clone https://github.com/SP4RKiOP/Azure-OpenAI-integration-with-db.git cd your-project -
Install the required packages: pip install -r requirements.txt
Configuration
-
Set your Azure OpenAI API key, base_url, and your deployment name in
utils.py:os.environ["OPENAI_API_KEY"] = "change with your key" os.environ["OPENAI_API_BASE"] = "change with your base url" os.environ["OPENAI_API_VERSION"] = "change with your version" deployment_name = "change with your model name" # (in llm connection string) -
Set your database connection string:
db = SQLDatabase.from_uri("mssql+pymssql://dbServerName:Password@dbServerName.database.windows.net:1433/dbName")
Usage
-
Start the server using waitress-serve:
waitress-serve --call wsgi:create_app -
The application will be accessible at http://localhost:8080.
Contributing
If you'd like to contribute to this project, feel free to do.
License
This project is licensed under the MIT License.