Try to Fix Embeding RAG Persisted Issues ...

This commit is contained in:
2026-11-01 23:12:25 +03:30
parent 1b74f23a18
commit c4b7e86174
3 changed files with 13 additions and 1 deletions
-1
View File
@@ -1,5 +1,4 @@
using xCommons.Extensions; using xCommons.Extensions;
using System.Collections.Generic;
namespace xAiModels.Extensions namespace xAiModels.Extensions
{ {
+6
View File
@@ -1,4 +1,5 @@
using System; using System;
using xAiModels.Constants;
namespace xAiModels.Models namespace xAiModels.Models
{ {
@@ -12,6 +13,11 @@ namespace xAiModels.Models
/// </summary> /// </summary>
public string Prompt { get; set; } public string Prompt { get; set; }
/// <summary>
/// Knowledge Type ...
/// </summary>
public string Type { get; set; } = XAiModelsConstants.XAiDefaultKnowledgeType;
/// <summary> /// <summary>
/// Provided TopK in Vector Searchs ... /// Provided TopK in Vector Searchs ...
/// </summary> /// </summary>
+7
View File
@@ -1387,6 +1387,13 @@ namespace xAiModels.Providers
XException.InvalidArgs.Throw(); XException.InvalidArgs.Throw();
} }
//
// Normalize ...
if (type.IsNullOrEmpty())
{
type = XAiModelsConstants.XAiDefaultKnowledgeType;
}
// //
// Converts Question Vector to Vector Array ... // Converts Question Vector to Vector Array ...
var queryVector = queryEmbedding.ToArray(); var queryVector = queryEmbedding.ToArray();