This is a web application built using .NET 7 and React.
The application uses Application Insights for logging and SQL Server for the database.
YCNBot uses OpenAI (https://openai.com/) and Azure OpenAI Service (https://learn.microsoft.com/en-us/azure/cognitive-services/openai/overview) as the two default options but users can add models.
The application uses XUnit/Moq for unit testing the backend.
YCNBot is designed to integrate with GPT and other models to facilitate generative chat.
YCN stands for Your Company Name, users should switch it to their company name, e.g. TraversSmithBot.
The application allows users to input their queries and receive automated responses generated by the AI models.
The system also stores the input/output data for future reference and analysis.
The application is built using React, a popular JavaScript library, to create a seamless user experience.
By plugging into various AI models, the application can provide users with a range of responses, making it a highly versatile tool.
This application requires a Microsoft SQL Server Database, Azure Key Vault and Application Insights instances to be created. Please see the "Other databases" section for information about using different databases.
Please see sections below for more information on those resources.
To run the application on your local machine, follow these steps:
YCNBot has a personal mode that allows the company to decide whether they want users to be able to use YCNBot for personal use.
All personal chats will not be recorded.
To enable/disable personal mode there are two steps:
To change the chat completion model in YCNBot, simply go to the appsettings.json file in the main project and update "ChatCompletionType" to the name of your model.
We have provided OpenAI and Azure OpenAI models.
To select OpenAI update "ChatCompletionType" to "OpenAI", for Azure OpenAI put "AzureOpenAI".
Adding a new model requires 3 steps:
YCNBot requires users to accept the company usage terms before logging in and using the system.
Please go to config.json in ClientApp/src and update "COMPANY_TERMS" to your company terms.
YCNBot uses OpenIdConnect for authentication and uses Azure Active Directory as the identity management provider.
The application uses Application Insights for logging. Application Insights is a monitoring service provided by Microsoft that helps you detect and diagnose issues with your web application.
To use Application Insights in your own application, you will need to create an Application Insights instance in the Azure portal and configure your application to use it.
Once you have done this, you can view telemetry data in the Application Insights portal.
https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview?tabs=net
The application uses Azure Keyvault for secrets management. The API keys for both Azure OpenAI and OpenAI are stored in Azure Key Vault.
https://learn.microsoft.com/en-us/azure/key-vault/general/overview
The application uses SQL Server for the database. SQL Server is a relational database management system provided by Microsoft.
To use SQL Server in your own application, you will need to have a SQL Server instance set up and running.
The application has been built with the Unit of Work/Repository design pattern, which allows users to simply change the data access layer (YCNBot.Data project) when making data persistence changes. Simply change the repositories/unit of work class and the start up configuration in the program.cs file and the application should still work with other data persistence technologies.
The license is MIT.