Swagger.AIChat 1.0.1

dotnet add package Swagger.AIChat --version 1.0.1                
NuGet\Install-Package Swagger.AIChat -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Swagger.AIChat" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Swagger.AIChat --version 1.0.1                
#r "nuget: Swagger.AIChat, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Swagger.AIChat as a Cake Addin
#addin nuget:?package=Swagger.AIChat&version=1.0.1

// Install Swagger.AIChat as a Cake Tool
#tool nuget:?package=Swagger.AIChat&version=1.0.1                

Build Status NuGet MIT License

Swagger AI Chat Example

This repository contains an example of how to integrate Swagger (OpanAPI) with an AI chat application in C#.

AI Chat Integration

You can interact with the Swagger API through an AI chat interface. This allows you to send requests and receive responses directly from the chat, making it easier to test and use the API without needing to manually navigate the Swagger UI.

Using Semantic Kernel for AI Integration

This example leverages Semantic Kernel as the medium for integrating AI capabilities. Semantic Kernel provides a robust framework for building and deploying AI models, making it easier to incorporate advanced AI functionalities into your applications.

demo

Semantic Kernel Integration

For detailed usage, refer to the code example below:

This code snippet describes how to add the configuration:

builder.Services.AddSingleton(new ChatAISetting 
{
    SystemPrompt = "You are an AI assistant that can help users call APIs.",
    OpenAPIPluginName = "weather_api",
    OpenAPIUrl = "https://localhost:7071/swagger/v1/swagger.json"
} );

This code snippet describes how to add the configuration for Chat AI resources.

app.UseSwaggerUI(options => options.AddSwaggerChatAIUI());
app.UseSwaggerChatAIUI();

You can find the complete code implementation in the Program.cs file. This file contains all the necessary configurations and setup required to integrate Swagger with the AI chat application.

Usage

Once the application is running, you can access the Swagger UI by navigating to https://localhost:7071/swagger in your web browser. This will provide you with an interactive interface to test the API endpoints.

Contributing

If you would like to contribute to this project, please fork the repository and submit a pull request.

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 45 3/5/2025
1.0.0 44 3/4/2025

History:
     v1.0.0:
     • Initial release
     v1.0.1:
     • Add README.md