This project provides a simple yet powerful way to generate concise, actionable summaries from structured text like incident logs, chat transcripts, or multi-agent conversations using Azure OpenAI's gpt-35-turbo.
git clone https://github.com/your-username/text-summarizer-azure.git cd text-summarizer-azure
-
Install dependencies pip install openai==0.28
-
Configure Azure OpenAI Set the following environment variables or update them directly in the script:
openai.api_type = "azure" openai.api_key = os.getenv("AZURE_OPENAI_KEY", "<YOUR_AZURE_OPENAI_KEY>") openai.api_base = "<YOUR_AZURE_ENDPOINT>" # e.g., https://your-resource-name.openai.azure.com/ openai.api_version = "2024-12-01-preview" DEPLOYMENT_NAME = "your-deployment-name" # e.g., "gpt-35-turbo"
- How It Works Function: summarize_text(text: str, context: str = "conversation") -> str This function:
Takes raw structured or unstructured text as input Uses an AI system prompt tailored to the given context (e.g., "conversation", "incident", "meeting") Returns a concise, readable summary suitable for dashboards, notifications, or follow-up AI actions