Commit Graph
23 Commits
Author SHA1 Message Date
saherelm fa1014bf20 Refactoring Services ... 2026-11-01 22:36:20 +03:30
saherelm 51dddb4b68 last ... 2026-11-01 18:11:26 +03:30
saherelm ce5db9e349 last ... 2026-10-31 17:19:17 +03:30
saherelm c1173042d4 last ... 2026-10-31 05:49:17 +03:30
saherelm ad8ea9c1dd Integrate RAG into Chat Pipeline and Decouple Embedding Service
- AskAsync: accept Guid? projectId / conversationId; resolve defaults;
- AskAsync: ingest attached files into Conversation scope (replaceExisting)
  via IXAiRAGService instead of Upload + Extract + raw content attachment;
- AskAsync: retrieve context (Conversation -> Project -> User -> Global)
  and build a single System message: Introduction + ChatWithDocuments prompt
  + Context block (+ Project prompt);
- XAIServiceBase / XDefaultAiService / XDefaultThinkingAiService:
  inject IXAiRAGService instead of IXFileProvider;
- Add IXAiEmbeddingService + XAiEmbeddingService; remove
  IXDefaultEmbeddingService + XDefaultEmbeddingService;
- XAiEmbeddingServiceBase no longer inherits XAIServiceBase;
  IXAiEmbeddingServiceBase / IXAiEmbeddingServiceControllerBase no longer
  extend chat interfaces; XAiEmbeddingServiceControllerBase derives from
  XBaseIdentityApiV1Controller;
- XAiRAGService: drop IXDefaultAiService dependency (removes circular
  dependency); remove AskWithRAGAsync / AskWithRAGAsEnumerable; add file
  reference (AddReference) for scoped ingests;
- KnowledgeController: remove POST Ask and POST AskStream;
- DI: add AddXRagService() and call it from Startup before AddXAiServices();
- Add XAiApiRagPromptName = "ChatWithDocuments";
- Knowledge scope factories default Type to XAiDefaultKnowledgeType;
- ChatWithDocuments ask request: TopK and MinScore are now required.
BREAKING: /Knowledge/Ask and /Knowledge/AskStream removed;
          IXDefaultEmbeddingService replaced by IXAiEmbeddingService.
2026-10-30 19:46:20 +03:30
saherelm fef38cad1b Fix Jinja Conversation Role Alternation in RAG Context History
- Merge Introduction prompt, RAG prompt and context block into one System message;
- Keep the user question as the following User message;
- Prevent consecutive System roles in AskWithContextAsync and AskWithContextAsEnumerable;
- Update the GetContextHistory XML documentation to describe the new message layout;
- Preserve the existing context retrieval and response flow.
- ...
2026-10-26 10:43:17 +03:30
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
saherelm 7cad889cd0 last ... 2026-10-03 17:42:36 +03:30
saherelm 4521a53734 fix file content extractor mechanism ... 2026-10-02 00:07:58 +03:30
saherelm aac3eb92c1 Start Add File Support in Messages Feature ... 2026-09-30 23:13:32 +03:30
saherelm efaf71d962 last ... 2026-09-30 15:27:39 +03:30
saherelm 383e42a8d2 last ... 2026-09-29 17:41:48 +03:30
saherelm fc679fe294 last ... 2026-09-28 22:36:02 +03:30
saherelm 767479e80d last ... 2026-09-28 16:35:04 +03:30
saherelm 7ddf4d90c4 last ... 2026-09-27 22:01:25 +03:30
saherelm d638292216 last ... 2026-09-27 16:08:51 +03:30
saherelm b596afbe57 last ... 2026-09-26 16:46:30 +03:30
saherelm ed8a66f432 refactor for better support of streaming and etc ... 2026-09-26 10:46:14 +03:30
saherelm 9afa413c6f adding vector model enabling and also test all using OpenAI model ... 2026-09-26 01:24:19 +03:30
saherelm 22de433023 last ... 2026-09-25 19:47:30 +03:30
saherelm a4bcde5994 last ... 2026-08-15 10:49:08 +03:30
saherelm 6723454690 last ... 2026-08-14 23:03:14 +03:30
saherelm aaa1ae2a2b last ... 2026-08-14 21:33:36 +03:30