Try to Fix Embeding RAG Persisted Issues ...
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using xCommons.Extensions;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace xAiModels.Extensions
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using xAiModels.Constants;
|
||||
|
||||
namespace xAiModels.Models
|
||||
{
|
||||
@@ -12,6 +13,11 @@ namespace xAiModels.Models
|
||||
/// </summary>
|
||||
public string Prompt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Knowledge Type ...
|
||||
/// </summary>
|
||||
public string Type { get; set; } = XAiModelsConstants.XAiDefaultKnowledgeType;
|
||||
|
||||
/// <summary>
|
||||
/// Provided TopK in Vector Searchs ...
|
||||
/// </summary>
|
||||
|
||||
@@ -1387,6 +1387,13 @@ namespace xAiModels.Providers
|
||||
XException.InvalidArgs.Throw();
|
||||
}
|
||||
|
||||
//
|
||||
// Normalize ...
|
||||
if (type.IsNullOrEmpty())
|
||||
{
|
||||
type = XAiModelsConstants.XAiDefaultKnowledgeType;
|
||||
}
|
||||
|
||||
//
|
||||
// Converts Question Vector to Vector Array ...
|
||||
var queryVector = queryEmbedding.ToArray();
|
||||
|
||||
Reference in New Issue
Block a user