Make projectId Nullable in Data Provider and Remove Api Configuration
- IXAiDataProvider.GetDefaultConversation: projectId changed from Guid to Guid?;
- XAiDataProvider.GetDefaultConversation / HasDefaultConversation /
CreateDefaultConversation: adapt to Guid? (use !projectId.HasValue instead of
projectId.IsNull(); resolve project via projectId.Value);
- XAiDataProvider: conversation lookup predicate fixed to
x.ProjectId == project.Id (was x.ProjectId == projectId);
- XEmbeddingExtensions: add ToEmbedding(this ReadOnlyMemory<float>) to persist
embeddings as JSON;
- XAiDataProvider: use item.Embedding.ToEmbedding() instead of ToJSON() when
upserting vectors;
- XAiModelsExtensions: rename GetDafualtProject -> GetDafaultProject (typo fix);
- Remove Configurations/XAiApiConfiguration.cs and
Extensions/XAiApiConfigurationExtensions.cs (Api configuration does not belong
to the models module).
BREAKING: XAiApiConfiguration / XAiApiConfigurationExtensions removed from
xAiModels; GetDafualtProject renamed to GetDafaultProject.
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
using xAiModels.Models;
|
||||
using xAiModels.Constants;
|
||||
|
||||
namespace xAiModels.Configurations
|
||||
{
|
||||
public class XAiApiConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Model Providers ...
|
||||
/// </summary>
|
||||
public XAiModelDescriptor[] Models { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Each User must Has a Default Project, this is Title Resource Identifier ...
|
||||
/// </summary>
|
||||
public string DefaultProjectTitleResource { get; set; } = XAiModelsConstants.DefaultXAiProjectTitleResourceID;
|
||||
|
||||
/// <summary>
|
||||
/// Each User must Has a Default Project, this is Description Resource Identifier ...
|
||||
/// </summary>
|
||||
public string DefaultProjectDescriptionResource { get; set; } = XAiModelsConstants.DefaultXAiProjectDescriptionResourceID;
|
||||
|
||||
/// <summary>
|
||||
/// Each User must Has a Default Conversation, this is Title Resource Identifier ... ...
|
||||
/// </summary>
|
||||
public string DefaultConversationTitleResource { get; set; } = XAiModelsConstants.DefaultXAiConversationTitleResourceID;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user