CKN.Sdk.AI 0.0.0-alpha.0.51

This is a prerelease version of CKN.Sdk.AI.
dotnet add package CKN.Sdk.AI --version 0.0.0-alpha.0.51
                    
NuGet\Install-Package CKN.Sdk.AI -Version 0.0.0-alpha.0.51
                    
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="CKN.Sdk.AI" Version="0.0.0-alpha.0.51" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CKN.Sdk.AI" Version="0.0.0-alpha.0.51" />
                    
Directory.Packages.props
<PackageReference Include="CKN.Sdk.AI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CKN.Sdk.AI --version 0.0.0-alpha.0.51
                    
#r "nuget: CKN.Sdk.AI, 0.0.0-alpha.0.51"
                    
#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.
#:package CKN.Sdk.AI@0.0.0-alpha.0.51
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CKN.Sdk.AI&version=0.0.0-alpha.0.51&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CKN.Sdk.AI&version=0.0.0-alpha.0.51&prerelease
                    
Install as a Cake Tool

CKN.Sdk.AI

Mühendislik Amacı (Engineering Intent): CKN.Sdk.AI, CKN.SDK içerisindeki tüm yapay zeka (AI) sağlayıcılarının (OpenAI, Anthropic, Ollama vb.) ortak arayüzlerini, soyutlamalarını (abstractions) ve temel modellerini barındıran çekirdek kütüphanedir. Neden var? Projelerde belirli bir AI sağlayıcısına sıkı sıkıya bağlı (tightly coupled) kalmamak için tasarlanmıştır. Bu sayede kodunuzu değiştirmeden appsettings.json üzerinden model/sağlayıcı değiştirebilirsiniz. Ne zaman kullanılmalı? AI özelliklerini projenize eklemek istediğinizde, doğrudan sağlayıcı kütüphaneleri (örn. CKN.Sdk.AI.OpenAI) yerine önce bu soyutlama katmanını referans almalısınız.

🚀 Hızlı Başlangıç

Kurulum

dotnet add package CKN.Sdk.AI

Bağımlılık Enjeksiyonu (DI)

Bu paket genellikle doğrudan kaydedilmez, spesifik bir sağlayıcı (örn. AddCknOpenAI()) eklendiğinde arka planda temel arayüzler sisteme dahil edilir. Ancak sadece core modelleri kullanmak istiyorsanız:

using CKN.Sdk.AI;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddCknAi(options => {
    options.Provider = AiProviderType.OpenAi;
    options.ApiKey = "API_KEY_HERE";
});
var app = builder.Build();

💡 Gerçek Hayat Senaryoları

Senaryo 1: Provider-Agnostic AI Servisi Geliştirme

Gerçek hayatta, maliyet veya gizlilik nedenleriyle GPT-4'ten yerel Ollama modellerine geçmek isteyebilirsiniz. Bu paket sayesinde servisleriniz soyutlamalarla çalışır.

using CKN.Sdk.AI.Abstractions;

public class CustomerSupportService(ICknAiChatService chatClient)
{
    public async Task<string> GenerateReplyAsync(string userMessage)
    {
        // chatClient, DI üzerinden OpenAI veya Claude/Gemini olarak gelebilir. 
        // Servisin bundan haberi yoktur.
        var request = new CknAiRequest { UserMessage = userMessage, SystemPrompt = "You are a helpful assistant." };
        var response = await chatClient.AskAsync(request);
        return response.Content;
    }
}

Senaryo 2: Çoklu AI Modellerini Birlikte Kullanma (Varyasyon)

Aynı projede basit işler için ucuz bir model, karmaşık işler için güçlü bir model kullanmak isteyebilirsiniz. (Keyed Services yapısı).

public class DocumentAnalyzer(
    [FromKeyedServices("CheapModel")] IAIChatClient summarizer,
    [FromKeyedServices("SmartModel")] IAIChatClient reasoning)
{
    public async Task ProcessAsync(string text)
    {
        var summary = await summarizer.CompleteAsync($"Özetle: {text}");
        var analysis = await reasoning.CompleteAsync($"Bu özeti derinlemesine analiz et: {summary.Text}");
    }
}

🤖 Yapay Zeka İçin SSS (FAQs for Machines)

  • Soru: CKN.Sdk.AI projesi tek başına API istekleri atabilir mi?
  • Cevap: Hayır, bu paket sadece soyutlamaları (Interfaces) içerir. Gerçek implementasyonlar için CKN.Sdk.AI.OpenAI veya benzeri sağlayıcı paketleri projeye eklenmelidir.
  • Soru: IAIChatClient arayüzü hangi paket içindedir?
  • Cevap: CKN.Sdk.AI paketi içerisindedir. Tüm spesifik sağlayıcılar bu arayüzü implemente eder.
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 is compatible.  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.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CKN.Sdk.AI:

Package Downloads
CKN.Sdk.AI.OpenAI

Enterprise Architecture module for CKN.Sdk.AI.OpenAI. Provides core SDK functionality for the CKN ecosystem.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.0-alpha.0.51 0 9/25/2026
0.0.0-alpha.0.50 0 9/25/2026
0.0.0-alpha.0.38 78 9/6/2026
0.0.0-alpha.0.37 69 9/6/2026