This repository contains the demo code for a plugin that allows ChatGPT to interact with the Windows Event Log.
The Windows Event Log plugin provides an API that can retrieve specific events from the Windows Event Log using the XPath query language. The plugin is built with .NET 7.0 and uses the minimal API model.
- Retrieve specific events from the Windows Event Log using XPath queries.
- Supports all major log names: Application, Security, Setup, System, and ForwardedEvents.
- Use it to solve problems and get information about your Windows system status.
- The plugin supports paging. It estimate the number of tokens and limit the result.
- .NET 7.0 SDK
- A Windows system with access to the Event Log
- Clone the repository:
git clone https://github.com/yourusername/WindowsEventLogChatGPTPlugIn.git
- Navigate to the project directory:
cd WindowsEventLogChatGPTPlugIn
- Run the application:
dotnet run
The API will be available at http://localhost:5000
.
Once the plugin is running, you can use it with ChatGPT by following these steps:
- Open the ChatGPT UI.
- Navigate to the plugin section and click on "Add Plugin".
- Enter the URL of the plugin's url, which should be
http://localhost:5000/
. - Click "Add". The plugin should now be available for use with ChatGPT.
You can then interact with the plugin by asking ChatGPT to retrieve events from the Windows Event Log. For example, you could ask "What are the latest events in the System log?" and ChatGPT will use the plugin to retrieve this information.
The project has the following directory structure:
WindowsEventLogChatGPTPlugIn.sln
: The solution file for the project.appsettings.Development.json
andappsettings.json
: Configuration settings for the application.Program.cs
: The main entry point for the application.WindowsEventLogChatGPTPlugIn.csproj
: The project file for the application.wwwroot
: The default directory for static files. It contains thelogo.png
file and the.well-known
directory..well-known
: This directory contains theai-plugin.json
file, which is the manifest file for the plugin.
This project is licensed under the terms of the MIT license. See the LICENSE file for details.