Files
xSaherElmAiApi/Configurations/XAiApiConfiguration.cs
T
saherelm 47da04a594 Implement Chat With Documents (In-Memory RAG) ...
- Add XAiDocumentModels (IngestResult, AskRequest, Answer, AnswerChunk, Source, SessionInfo, RAGDescriptor DTOs);
- Add AskWithContextAsync and AskWithContextAsEnumerable (Context Actions) to IXAiServiceBase and XAIServiceBase;
- Add GetContextHistory and BuildContextBlock Helpers for Building RAG Chat History without Persisting;
- Rewrite ChatWithDocumentsController with Ingest, Ask, AskStream (SSE), Get Session and Delete Session Endpoints;
- Add XInMemoryVectorStoreCleanupService (BackgroundService) for Removing Expired Sessions Periodically;
- Add AddXAiChatWithDocuments DI Extension, Register Cleanup HostedService and use it in Startup;
- Add RAGDescriptor Property to XAiApiConfiguration and its Section to appsettings.Development.json;
- Add ChatWithDocuments System Prompt to Prompts in appsettings.Development.json;
- Add IsValid Extension Method for XAiDocumentAskRequest;
- Optimize XInMemoryVectorStore.Search (Query Embedding Converted once) and Refactor Formatting;
- Remove Unused Usings in XAIServiceBase and IXAiServiceBase;
- ...
2026-10-25 22:24:39 +03:30

49 lines
1.4 KiB
C#

using xAiApi.Models;
using xAiModels.Models;
namespace xAiApi.Configurations
{
public class XAiApiConfiguration
{
/// <summary>
/// Allowed Models to Use ...
/// </summary>
public XAiModelDescriptor[] Models { get; set; } = [];
/// <summary>
/// Allowed Prompts to Use ...
/// </summary>
public XAiPromptDescriptor[] Prompts { get; set; } = [];
/// <summary>
/// OCR Configuration ...
/// </summary>
public XAiOCRDescriptor OCR { get; set; } = new();
/// <summary>
/// Transcript Configuration ...
/// </summary>
public XAiTransciptDescriptor Transcript { get; set; } = new();
/// <summary>
/// PDF To Image Configuration ...
/// </summary>
public XPDFToImageDescriptor PDFToImageDescriptor { get; set; } = new();
/// <summary>
/// Proxy Configuration ...
/// </summary>
/// <returns></returns>
public XAiModelProxyConfiguration ProxyConfiguration { get; set; } = new();
/// <summary>
/// Text Chunker Configuration ...
/// </summary>
public XTextChunkerDescriptor TextChunker { get; set; } = new();
/// <summary>
/// RAG Configuration ...
/// </summary>
public XAiDocumentRAGDescriptor RAGDescriptor {get; set;} = new();
}
}