{"id":17789508,"url":"https://github.com/benderscript/azure_ai_chat_completions","last_synced_at":"2026-05-04T11:32:19.619Z","repository":{"id":203219665,"uuid":"706423155","full_name":"BenderScript/azure_ai_chat_completions","owner":"BenderScript","description":"Azure AI Chat Completions Example","archived":false,"fork":false,"pushed_at":"2024-11-20T08:21:42.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T16:28:42.703Z","etag":null,"topics":["ai","azure","chat","completions","gpt-4","gpt4","openai","openai-a"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BenderScript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-10-17T23:27:54.000Z","updated_at":"2024-11-20T08:21:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"168e7e57-653f-4e69-a843-a6c7ebe798be","html_url":"https://github.com/BenderScript/azure_ai_chat_completions","commit_stats":null,"previous_names":["benderscript/azure_ai_chat_completions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2Fazure_ai_chat_completions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2Fazure_ai_chat_completions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2Fazure_ai_chat_completions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2Fazure_ai_chat_completions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenderScript","download_url":"https://codeload.github.com/BenderScript/azure_ai_chat_completions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246735363,"owners_count":20825224,"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","azure","chat","completions","gpt-4","gpt4","openai","openai-a"],"created_at":"2024-10-27T10:32:45.797Z","updated_at":"2025-10-17T15:44:46.433Z","avatar_url":"https://github.com/BenderScript.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimalistic Azure AI Chat Completion\n\nThree versions are provided:\n\n- Basic Chat Coompletions\n- Chat Completions with Structured Output using OpenAI SDK\n- Chat Completions with Structured Output using Lancgchain\n\n## Overview\n\nThis is a simple Python application that uses the Azure OpenAI AI API to generate chat completions. \n\n## Prerequisites\n\n- Python 3.11 or higher\n\n## Setup\n\n1. Clone the repository.\n2. Install the required Python libraries using pip:\n\n    ```bash\n    pip3 install -r requirements.txt\n    ```\n\n3. Create a `.env` file in the root directory of the project and add your Azure AI API credentials and settings:\n\n    ```bash\n   AZURE_OPENAI_API_KEY=your-key\n   AZURE_OPENAI_ENDPOINT=your URL endpoint\n   AZURE_OPENAI_API_VERSION=\u003csuch as 2024-08-01-preview\u003e\n   AZURE_OPENAI_DEPLOYMENT=\u003cyour deployment name\u003e\n    ```\n\n## Usage\n\nRun the script using Python:\n\n```bash\npython main.py\n```\n\nThe script will load the settings from the `.env` file, make a chat completion request to the Azure OpenAI deployment you specified\n\nIf you are working with pure REST the full URL will look like:\n\n```bash\nurl = openai_api_base + \"openai/deployments/\" + deployment_name + \"/chat/completions?api-version=\" + openai_api_version\n```\n\n## Customization\n\nYou can customize the script by modifying the `messages` dictionary.\n\n## Troubleshooting\n\nIf you encounter any errors, check the printed error message and status code for clues about what went wrong. Common issues include incorrect API credentials in the `.env` file and network connectivity problems.\n\n## Contributing\n\nContributions are welcome! Please read our contributing guidelines before submitting a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenderscript%2Fazure_ai_chat_completions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenderscript%2Fazure_ai_chat_completions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenderscript%2Fazure_ai_chat_completions/lists"}