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
+32
View File
@@ -0,0 +1,32 @@
using xAiApi.Models;
using System.Collections.Generic;
namespace xAiApi.Interfaces
{
/// <summary>
/// a Service for Splitting Long Texts into Overlapping Chunks
/// which Suitable for Embedding ...
/// </summary>
public interface IXTextChunker
{
/// <summary>
/// Split Text into Chunks ...
/// </summary>
/// <param name="text">Source Text</param>
/// <param name="source">Source Name (e.g. File Name) used for Identifier</param>
/// <returns></returns>
IList<XTextChunk> Chunk(
string text,
string source = null
);
/// <summary>
/// Split Text into Chunks and Return only Texts ...
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
IList<string> ChunkTexts(
string text
);
}
}