Ikon.Sdk.DotNet
1.14.0
See the version list below for details.
dotnet add package Ikon.Sdk.DotNet --version 1.14.0
NuGet\Install-Package Ikon.Sdk.DotNet -Version 1.14.0
<PackageReference Include="Ikon.Sdk.DotNet" Version="1.14.0" />
paket add Ikon.Sdk.DotNet --version 1.14.0
#r "nuget: Ikon.Sdk.DotNet, 1.14.0"
// Install Ikon.Sdk.DotNet as a Cake Addin #addin nuget:?package=Ikon.Sdk.DotNet&version=1.14.0 // Install Ikon.Sdk.DotNet as a Cake Tool #tool nuget:?package=Ikon.Sdk.DotNet&version=1.14.0
Ikon AI C# SDK
Welcome to the Ikon AI C# SDK. This SDK is designed to help developers integrate and interact with Ikon's services easily using C#. The SDK provides a straightforward API to manage rooms, handle events, and communicate within the Ikon platform.
Features
- Initialize client with developer credentials
- Connect to and manage multiple rooms
- Send and receive messages within rooms
- Event handling before and after connections, and on messages
Installation
To start using the Ikon AI C# SDK, include the libraries in your C# project. Ensure that your project is compatible with .NET 8.0 or .NET Standard 2.1.
Usage
Creating an Ikon Client
To create an Ikon client instance, you need an API key, a space ID, and a user ID.
var clientInfo = new Sdk.ClientInfo
{
ApiKey = Environment.GetEnvironmentVariable("IKON_SDK_API_KEY") ?? throw new Exception("API key is missing. Please set the 'IKON_SDK_API_KEY' environment variable."),
SpaceId = Environment.GetEnvironmentVariable("IKON_SDK_SPACE_ID") ?? "<<SET_SPACE_ID_HERE>>",
UserId = Environment.GetEnvironmentVariable("IKON_SDK_USER_ID") ?? "<<SET_USER_ID_HERE>>",
UseProductionEndpoint = Environment.GetEnvironmentVariable("IKON_SDK_USE_PROD_ENDPOINT")?.Trim().Equals("true", StringComparison.InvariantCultureIgnoreCase) ?? true,
RequestTimeout = 5.0,
Description = "Example",
DeviceId = Utils.GenerateDeviceId(),
ProductId = "Ikon.Sdk.DotNet.Example",
VersionId = Version.VersionString,
InstallId = "1",
UserType = UserType.Human,
OpcodeGroupsFromServer = Opcode.GROUP_ALL,
OpcodeGroupsToServer = Opcode.GROUP_ALL,
};
var ikonClient = await Sdk.CreateIkonClientAsync(clientInfo);
Managing Rooms
Once the client is initialized, you can connect to a room, send messages, and handle various room-related events.
var roomSlug = Environment.GetEnvironmentVariable("IKON_SDK_ROOM_SLUG") ?? "<<SET_ROOM_SLUG_HERE>>";
var room = new Room(ikonClient, roomSlug);
await room.ConnectAsync();
Sending Messages
To send messages to a room:
room.SendText("Hello, Ikon!");
Handling Events
Implement the event handlers to manage different room events, e.g. Start, Shutdown, Text, and more.
private async Task OnRoomText(object sender, Room.TextArgs e)
{
await Task.CompletedTask;
Console.WriteLine($"\n{e.UserName}: {e.Text}\n");
}
// Assign the event handler
room.Text += OnRoomText;
Helper Functions
room.SetState("TestVariable", 1234); // Set any variable defined in the Input section
room.ClearState(); // Clear all variables from the state
room.GenerateAnswer(); // Generate an answer without providing any input
room.ClearMessageHistory(); // Clear the message history of the whole room
Example Program
For an up-to-date example program, see the included Ikon.Sdk.DotNet.Examples.Chat/Program.cs
source file.
License
This SDK is licensed under the Ikon AI SDK License. See the LICENSE file for more details.
Support
For support, please open an issue on our GitHub repository or contact our support team through our support channel.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Concentus (>= 2.2.2)
- Ikon.Common.Core (>= 1.14.0)
- jose-jwt (>= 5.0.0)
-
net8.0
- Concentus (>= 2.2.2)
- Ikon.Common.Core (>= 1.14.0)
- jose-jwt (>= 5.0.0)
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.30.0.890 | 0 | 2/23/2025 |
1.30.0.888 | 26 | 2/22/2025 |
1.30.0.886 | 30 | 2/22/2025 |
1.30.0.885 | 27 | 2/22/2025 |
1.30.0.884 | 28 | 2/22/2025 |
1.30.0.882 | 29 | 2/22/2025 |
1.30.0.881 | 38 | 2/22/2025 |
1.30.0.880 | 52 | 2/21/2025 |
1.30.0.879 | 43 | 2/21/2025 |
1.30.0.877 | 47 | 2/21/2025 |
1.30.0.875 | 47 | 2/21/2025 |
1.30.0.874 | 46 | 2/21/2025 |
1.30.0.873 | 46 | 2/21/2025 |
1.30.0.872 | 50 | 2/21/2025 |
1.30.0.871 | 52 | 2/21/2025 |
1.30.0.870 | 43 | 2/21/2025 |
1.30.0.869 | 50 | 2/21/2025 |
1.30.0.868 | 47 | 2/21/2025 |
1.30.0.864 | 45 | 2/21/2025 |
1.30.0.863 | 46 | 2/21/2025 |
1.30.0.861 | 49 | 2/20/2025 |
1.30.0.856 | 48 | 2/20/2025 |
1.30.0.855 | 38 | 2/20/2025 |
1.30.0.854 | 35 | 2/20/2025 |
1.30.0.853 | 46 | 2/20/2025 |
1.30.0.852 | 42 | 2/20/2025 |
1.30.0.851 | 40 | 2/20/2025 |
1.30.0.847 | 41 | 2/20/2025 |
1.30.0.846 | 37 | 2/20/2025 |
1.30.0.845 | 39 | 2/20/2025 |
1.30.0.841 | 42 | 2/20/2025 |
1.30.0.840 | 41 | 2/20/2025 |
1.30.0.839 | 40 | 2/19/2025 |
1.30.0.838 | 36 | 2/19/2025 |
1.30.0.837 | 33 | 2/19/2025 |
1.30.0.836 | 45 | 2/19/2025 |
1.30.0.833 | 40 | 2/19/2025 |
1.30.0.831 | 31 | 2/19/2025 |
1.30.0.829 | 32 | 2/19/2025 |
1.30.0.828 | 40 | 2/19/2025 |
1.30.0.827 | 37 | 2/19/2025 |
1.30.0.826 | 33 | 2/19/2025 |
1.30.0.825 | 36 | 2/19/2025 |
1.30.0.824 | 43 | 2/19/2025 |
1.30.0.823 | 39 | 2/19/2025 |
1.30.0.822 | 42 | 2/19/2025 |
1.30.0.821 | 38 | 2/19/2025 |
1.30.0 | 112 | 12/31/2024 |
1.29.0 | 99 | 11/10/2024 |
1.28.0 | 116 | 9/18/2024 |
1.27.0 | 128 | 9/16/2024 |
1.26.0 | 109 | 9/5/2024 |
1.25.0 | 140 | 8/24/2024 |
1.24.0 | 142 | 8/22/2024 |
1.23.0 | 132 | 8/16/2024 |
1.22.0 | 123 | 8/15/2024 |
1.21.0 | 119 | 8/15/2024 |
1.20.0 | 85 | 8/2/2024 |
1.19.0 | 91 | 8/1/2024 |
1.18.0 | 92 | 8/1/2024 |
1.17.0 | 82 | 7/31/2024 |
1.16.0 | 93 | 7/30/2024 |
1.15.0 | 89 | 7/30/2024 |
1.14.0 | 85 | 7/30/2024 |
1.13.0 | 88 | 7/30/2024 |