Skip to content

Azure OpenAI EntraID ConsoleApp is a console application written in C# that integrates with Azure OpenAI REST API and Entra ID services.

License

Notifications You must be signed in to change notification settings

ppiova/AzureOpenAI-EntraID-ConsoleApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Open AI Rest API - EntraID - ConsoleApp

Project Description

Azure OpenAI EntraID ConsoleApp is a console application written in C# that integrates with Azure OpenAI REST API and Entra ID services. The application demonstrates how to authenticate with Azure services and interact with an AI assistant via the command line.

Key Features

  • Authenticate with Azure using Tenant ID, Client ID, and Client Secret.
  • Communicate with an AI assistant using the command line.
  • Optionally include images in queries to the AI assistant.

Installation

Prerequisites

  • .NET SDK (version 6.0 or higher)
  • Azure account with necessary permissions
  • Configuration settings for Azure services

Setup

  1. Clone the repository:

    git clone https://github.com/ppiova/AzureOpenAI-EntraID-ConsoleApp.git
    cd AzureOpenAI-EntraID-ConsoleApp
  2. Configure the application:

    • Create a appsettings.json file in the root directory with the following content:
      {
        "AzureSettings": {
          "TenantId": "<Your Tenant ID>",
          "ClientId": "<Your Client ID>",
          "ClientSecret": "<Your Client Secret>",
          "Resource": "<Your Resource>",
          "Endpoint": "<Your Endpoint>"
        }
      }

Usage

  1. Run the application:

    dotnet run --project AOAI-EntraID-ConsoleApp
  2. Follow the prompts to interact with the AI assistant and optionally include images in your queries.

Example

[assistant]: Hello! How can I assist you today?
Do you want to include an image in the query? (y/n)
Enter your question (type 'exit' to end):

Resources

Contributing

If you wish to contribute to the project, please fork the repository and create a pull request with your changes.

License

This project is licensed under the MIT License.

Contact

For any questions or inquiries, please contact the repository owner.

About

Azure OpenAI EntraID ConsoleApp is a console application written in C# that integrates with Azure OpenAI REST API and Entra ID services.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages