Try to Fix Embeding RAG Persisted Issues ...
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
using xCommons.Extensions;
|
using xCommons.Extensions;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace xAiModels.Extensions
|
namespace xAiModels.Extensions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user