feat: implement AI-driven knowledge extraction service with semantic caching and persistent storage
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
using FluentResults;
|
||||
using NexusReader.Application.DTOs.AI;
|
||||
|
||||
namespace NexusReader.Application.Abstractions.Services;
|
||||
|
||||
public interface IKnowledgeService
|
||||
{
|
||||
Task<Result<KnowledgePacket>> GetKnowledgeAsync(string text, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NexusReader.Application.DTOs.AI;
|
||||
|
||||
public record KeyConcept(
|
||||
[property: JsonPropertyName("title")] string Title,
|
||||
[property: JsonPropertyName("description")] string Description
|
||||
);
|
||||
|
||||
public record QuizQuestion(
|
||||
[property: JsonPropertyName("question")] string Question,
|
||||
[property: JsonPropertyName("options")] List<string> Options,
|
||||
[property: JsonPropertyName("correct_index")] int CorrectIndex
|
||||
);
|
||||
|
||||
public record KnowledgePacket(
|
||||
[property: JsonPropertyName("concepts")] List<KeyConcept> Concepts,
|
||||
[property: JsonPropertyName("quizzes")] List<QuizQuestion> Quizzes
|
||||
);
|
||||
Reference in New Issue
Block a user