-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store embeddings in Azure Cognitive Search
- Loading branch information
Showing
20 changed files
with
817 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
|
||
using System; | ||
|
||
namespace Microsoft.SemanticMemory.Core20; | ||
|
||
/// <summary> | ||
/// Provides the base exception from which all Semantic Kernel exceptions derive. | ||
/// </summary> | ||
public class SemanticMemoryException : Exception | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="SemanticMemoryException"/> class with a default message. | ||
/// </summary> | ||
public SemanticMemoryException() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="SemanticMemoryException"/> class with its message set to <paramref name="message"/>. | ||
/// </summary> | ||
/// <param name="message">A string that describes the error.</param> | ||
public SemanticMemoryException(string? message) : base(message) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="SemanticMemoryException"/> class with its message set to <paramref name="message"/>. | ||
/// </summary> | ||
/// <param name="message">A string that describes the error.</param> | ||
/// <param name="innerException">The exception that is the cause of the current exception.</param> | ||
public SemanticMemoryException(string? message, Exception? innerException) : base(message, innerException) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
|
||
using System; | ||
using System.Text.Json.Serialization; | ||
using Microsoft.SemanticKernel.AI.Embeddings; | ||
|
||
namespace Microsoft.SemanticMemory.Core.ContentStorage; | ||
|
||
public class EmbeddingFileContent | ||
{ | ||
[JsonPropertyName("generator_name")] | ||
[JsonPropertyOrder(1)] | ||
public string GeneratorName { get; set; } = string.Empty; | ||
|
||
[JsonPropertyName("generator_provider")] | ||
[JsonPropertyOrder(2)] | ||
public string GeneratorProvider { get; set; } = string.Empty; | ||
|
||
[JsonPropertyName("vector_size")] | ||
[JsonPropertyOrder(3)] | ||
public int VectorSize { get; set; } | ||
|
||
[JsonPropertyName("source_file_name")] | ||
[JsonPropertyOrder(4)] | ||
public string SourceFileName { get; set; } = string.Empty; | ||
|
||
[JsonPropertyName("vector")] | ||
[JsonPropertyOrder(100)] | ||
public Embedding<float> Vector { get; set; } | ||
|
||
[JsonPropertyName("timestamp")] | ||
[JsonPropertyOrder(5)] | ||
public DateTimeOffset TimeStamp { get; set; } = DateTimeOffset.UtcNow; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.