add TextChunker Service for AI Project ...

This commit is contained in:
2026-10-25 17:23:03 +03:30
parent 4b857de518
commit 429b97cded
9 changed files with 760 additions and 6 deletions
+38
View File
@@ -0,0 +1,38 @@
namespace xAiApi.Models
{
/// <summary>
/// Represents a Chunk of a Text which Produced by Text Chunker ...
/// </summary>
public class XTextChunk
{
/// <summary>
/// Zero Based Index of Chunk in Source Text ...
/// </summary>
public int Index { get; set; }
/// <summary>
/// Chunk Text Content ...
/// </summary>
public string Text { get; set; } = string.Empty;
/// <summary>
/// Source Name (e.g. File Name) which Chunk Extracted From ...
/// </summary>
public string Source { get; set; }
/// <summary>
/// Doc and Chunk Identifier (e.g. "file.pdf#3") ...
/// </summary>
public string Identifier { get; set; }
/// <summary>
/// Start Offset of Chunk in Normalized Source Text ...
/// </summary>
public int StartOffset { get; set; }
/// <summary>
/// Length of Chunk Text ...
/// </summary>
public int Length => Text?.Length ?? 0;
}
}