All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
This project adheres to Azure API Versioning with Revisions enabled.
Each version and revision is followed by a date of change, specially for under development versions. Each entry provides the following information (when applicable):
- Breaking Changes: changes that may certainty affect consumers of the API or how it is expected to be used.
- Major Changes: big improvements in the code, like adding or enabling features, or bug fixes.
- Minor Changes: small changes that have little impact, like spell checks in an API's documentation, adding or removing comments, etc.
Also, any bug fix must start with the prefix �Bug fix:� followed by the description of the changes per se.
Previous classification is not required if changes are simple or all belong to the same category.
- Created a new project
Encamina.Enmarcha.Aspire
to handle configurations and extensions for Aspire. - Added
ResourceBuilderExtensions
class inEncamina.Enmarcha.Aspire.Extensions
, which provides extension methods for configuring resources.- The method
WithEnvironment<T>
was added to allow adding an array of environment variables to resources in a type-safe manner.
- The method
- Added the
AuthenticationRequired
property toSmtpClientOptions.cs
, which is set totrue
by default. This indicates that authentication is required to connect to the SMTP server. If set tofalse
, the server does not require authentication, meaning no username or password is needed for the connection. - Added the
AtLeastOneRequiredAttribute
Data Annotation to validate that at least one of the specified properties has a value. - Enchanced
JsonUtils
with new methods:FastCheckIsJson
andIsAnAdaptiveCard
. - Added new
AtLeastOneRequiredSchemaFilter
to ensure OpenAPI schemas enforce that at least one of the specified properties is required, by modifying the schema to use theanyOf
rule in Swagger documentation generation. - Added two new connectors to
Encamina.Enmarcha.SemanticKernel.Connectors.Document
:- Document connector for reading
.doc
files:DocDocumentConnector
. - Document connector for reading
.html
files:HtmlDocumentConnector
.
- Document connector for reading
DocumentConnectorProviderBase
no longer automatically registers document connectors. Instead, it will register available connectors in the dependency container. This means that document connectors must be registered manually in the dependency container. For this purpose, new extension methods have been added toIServiceCollection
that allow to register document connectors in the dependency container. Also theAddDefaultDocumentConnectors
method has been added inIServiceCollectionExtensions
to register document connectors that were registered by default before.
- Added the
IEnmarchaDocumentConnector
interface that extends the existingIDocumentConnector
. This interface, by now, adds aCompatibleFileFormats
property that returns the file formats supported by the connector. Existing document connectors have been updated to implement this interface. - Added
CsvTsvDocumentConnector
document connector that allows to read CSV and TSV files keeping the headers in different chunks. - Added
SkVisionImageDocumentConnector
which allows to read images and extract text from them. Using Semantic Kernel vision capabilities. You can configure the connector with theSkVisionImageDocumentConnectorOptions
class. - The
IDocumentConnectorProvider
interface now works with theIEnframeDocumentConnector
interface instead ofIDocumentConnector
.- The
AddDocumentConnector
function has been modified by removing thefileExtension
parameter, which will now come in theCompatibleFileFormats
property of the document connector.
- The
- The
ParagraphPptxDocumentConnector
class is no longer sealed, allowing the creation of derived classes. - The
SlidePptxDocumentConnector
class is no longer sealed, allowing the creation of derived classes. - The
TxtDocumentConnector
class is no longer sealed, allowing the creation of derived classes. - The
VttDocumentConnector
class is no longer sealed, allowing the creation of derived classes. - Refactored and reorganized the
IIntentResponsesProvider
functionality:- Introduced new projects:
Encamina.Enmarcha.Conversation.Abstractions
, andEncamina.Enmarcha.Conversation
. - Moved
IIntentResponsesProvider
andResponse
classes toEncamina.Enmarcha.Conversation.Abstractions
. - Moved
TableStorageResponseProvider
class toEncamina.Enmarcha.Conversation
. - Updated
LocalizedResponseGreetingsProvider.cs
to use new abstractions.
- Introduced new projects:
- Updated dependencies:
- Updated all
Microsoft.SemanticKernel.XXX
packages to1.17.2
- Updated Azure.Core from 1.40.0 to 1.43.0
- Updated Azure.Data.Tables from 12.8.3 to 12.9.0
- Updated Bogus from 35.5.1 to 35.6.1
- Updated Encamina.Enmarcha.Testing.Smtp from MimeKit 4.5.0 to 4.7.1
- Updated MailKit from 4.7.0 to 4.7.1.1
- Updated Microsoft.AspNetCore.Authentication.JwtBearer from 8.0.6 to 8.0.8
- Updated Microsoft.Azure.Cosmos from 3.41.0 to 3.43.0
- Updated Microsoft.Bot.Builder.Azure from 4.22.7 to 4.22.8
- Updated Microsoft.Bot.Builder.Azure.Blobs from 4.22.7 to 4.22.8
- Updated Microsoft.Bot.Builder.Dialogs from 4.22.7 to 4.22.8
- Updated Microsoft.Bot.Builder.Integration.ApplicationInsights.Core from 4.22.7 to 4.22.8
- Updated Microsoft.Bot.Builder.Integration.AspNet.Core from 4.22.7 to 4.22.8
- Updated Microsoft.EntityFrameworkCore from 8.0.6 to 8.0.8
- Updated Microsoft.EntityFrameworkCore.SqlServer from 8.0.6 to 8.0.8
- Updated Microsoft.Extensions.Azure from 1.7.4 to 1.7.5
- Updated Swashbuckle.AspNetCore.SwaggerGen from 6.6.2 to 6.7.3
- Updated System.Text.Json from 8.0.3 to 8.0.4
- Updated all
- Added
SetRecipients
method toIEmailBuilder
interface. - Added
DocumentTooLargeException
class to handle exceptions when the document is too large to be processed. - Added
gpt-4o-mini
toModelInfo
. - Increased tokens in
TextSplitterOptions
default values. - Added new property In
Encamina.Enmarcha.AI.OpenAI.Azure.AzureOpenAIOptions
calledUseDefaultAzureCredentialAuthentication
to support connections with Managed Identities. - In
Encamina.Enmarcha.AI.OpenAI.Azure.AzureOpenAIOptions
theKey
property is now only required if propertiesUseDefaultAzureCredentialAuthentication
andUseTokenCredentialAuthentication
are both false. - In
Encamina.Enmarcha.AI.QuestionsAnswering.Abstractions
, enum typeLogicalOperations
is now marked as obsolete. It is being replace by enum typeLogicOperations
(same name) inEncamina.Enmarcha.Core
(different project and namespace). It will be removed in future versions. - Improved data annotation
RequiredIfAttribute
fromEncamina.Enmarcha.Core.DataAnnotations
to support multiple conditions and properties. - In class
CosmosOptions
fromEncamina.Enmarcha.Data.Cosmos
added new propertyUseDefaultAzureCredentialAuthentication
to support connections with Managed Identities. - In class
CosmosOptions
fromEncamina.Enmarcha.Data.Cosmos
theKey
property is now only required if propertyUseDefaultAzureCredentialAuthentication
isfalse
. - Added some compilation support classes to
Encamina.Enmarcha.AO.OpenAI.Azure
to support language features like therequired
keyword. - Fixed various warnings from SonarCloud, including nullability properties.
- Now
RecursiveCharacterTextSplitter
does not return empty chunks.
- Updated dependencies:
- Updated
Azure.AI.OpenAI
from1.0.0-beta.16
to1.0.0-beta.17
. - Updated
Azure.Core
from1.38.0
to1.40.0
. - Updated
Bogus
from35.5.0
to35.5.1
. - Updated
MailKit
from4.5.0
to4.7.0
. - Updated
Microsoft.AspNetCore.Authentication.JwtBearer
from8.0.4
to8.0.6
. - Updated
Microsoft.AspNetCore.Authentication.OpenIdConnect
from8.0.4
to8.0.6
. - Updated
Microsoft.Azure.Cosmos
from3.39.0
to3.41.0
. - Updated
Microsoft.Bot.Builder.Azure
from4.22.3
to4.22.7
. - Updated
Microsoft.Bot.Builder.Azure.Blobs
from4.22.3
to4.22.7
. - Updated
Microsoft.Bot.Builder.Dialogs
from4.22.3
to4.22.7
. - Updated
Microsoft.Bot.Builder.Integration.ApplicationInsights.Core
from4.22.3
to4.22.7
. - Updated
Microsoft.Bot.Builder.Integration.AspNet.Core
from4.22.3
to4.22.7
. - Updated
Microsoft.EntityFrameworkCore
from8.0.4
to8.0.6
. - Updated
Microsoft.EntityFrameworkCore.SqlServer
from8.0.4
to8.0.6
. - Updated
Microsoft.Extensions.Azure
from1.7.3
to1.7.4
. - Updated
Microsoft.NET.Test.Sdk
from17.9.0
to17.10.0
. - Updated
Microsoft.SemanticKernel.Abstractions
from1.10.0
to1.15.0
. - Updated
Microsoft.SemanticKernel.Core
from1.10.0
to1.15.0
. - Updated
MimeKit
from4.5.0
to4.7.1
. - Updated
SharpToken
from2.0.2
to2.0.3
. - Updated
Swashbuckle.AspNetCore.SwaggerGen
from6.5.0
to6.6.2
. - Updated
System.Text.Json
from8.0.3
to8.0.4
. - Updated
xunit
from2.7.1
to2.8.1
. - Updated
xunit.analyzers
from1.12.0
to1.14.0
. - Updated
xunit.extensibility.core
from2.7.1
to2.8.1
. - Updated
xunit.runner.visualstudio
from2.5.8
to2.8.1
.
- Updated
- Added
MaxTokensOutput
property inModelInfo
. - Added
SaveChatMessagesHistoryBatchAsync
inChatHistoryProvider
. - Fixed some warnings in:
Encamina.Enmarcha.Bot
Encamina.Enmarcha.Core
Encamina.Enmarcha.Data
Encamina.Enmarcha.Email
Encamina.Enmarcha.Entities
Encamina.Enmarcha.SemanticKernel
Encamina.Enmarcha.Services
- Class
IDocumentConnectorUtils
has been removed. Please use an instance ofIDocumentConnectorProvider
and the methodSupportedFileExtension
to check if the file extension is supported and the methodGetDocumentConnector
to get the appropriate document connector. - The method
GetDocumentConnector
from interface typeIDocumentConnectorProvider
now throwsInvalidOperationException
if a connector for the specified file extension is not found. - Renamed
UserId
toIndexerId
inChatMessageHistoryRecord
. This change requires consumers to update their database to match the new property name.- In case of using Cosmos DB,
IndexerId
should be the new partition key of the collection. You can learn how to change the partition key and do the data migration here.
- In case of using Cosmos DB,
- Split the
OpenAIOptions
class into two separate classes:- Created a new abstract class
OpenAIOptionsBase
containing common properties related to OpenAI model configuration. - Moved the
Key
property to a new concrete classOpenAIOptions
. AzureOpenAIOptions
no longer inherits fromOpenAIOptions
, but now inherits fromOpenAIOptionsBase
.
- Created a new abstract class
- Updated dependencies:
- Updated
Asp.Versioning.Mvc.ApiExplorer
from8.0.0
to8.1.0
. - Updated
Azure.AI.OpenAI
from1.0.0-beta14
to1.0.0-beta16
. - Updated
Bogus
from35.4.1
to35.
5.0`. - Updated
MailKit
from4.4.0
to4.5.0
. - Updated
MimeKit
from4.4.0
to4.5.0
. - Updated
Microsoft.AspNetCore.Authentication.JwtBearer
from8.0.2
to8.0.4
. - Updated
Microsoft.AspNetCore.Authentication.OpenIdConnect
from8.0.2
to8.0.4
. - Updated
Microsoft.Bot.Builder.Azure
from4.22.2
to4.22.3
. - Updated
Microsoft.Bot.Builder.Azure.Blobs
from4.22.2
to4.22.3
. - Updated
Microsoft.Bot.Builder.Dialogs
from4.22.2
to4.22.3
. - Updated
Microsoft.Bot.Builder.Integration.ApplicationInsights.Core
from4.22.2
to4.22.3
. - Updated
MMicrosoft.Bot.Builder.Integration.AspNet.Core
from4.22.2
to4.22.3
. - Updated
Microsoft.Azure.Cosmos
from3.38.1
to3.39.0
. - Updated
Microsoft.EntityFrameworkCore
from8.0.2
to8.0.4
. - Updated
Microsoft.EntityFrameworkCore.SqlServer
from8.0.2
to8.0.4
. - Updated
Microsoft.Extensions.Logging.Abstractions
from8.0.0
to8.0.1
. - Updated
Microsoft.Extensions.Azure
from1.7.2
to1.7.3
. - Updated
Microsoft.Extensions.DependencyInjection.Abstractions
from8.0.0
to8.0.1
. - Updated
Microsoft.SemanticKernel.Abstractions
from1.6.2
to1.10.0
. - Updated
Microsoft.SemanticKernel.Connectors.AzureAISearch
from1.6.2-alpha
to1.10.0-alpha
. This does fix the Issue 72. - Updated
Microsoft.SemanticKernel.Connectors.OpenAI
from1.6.2
to1.10.0
. - Updated
Microsoft.SemanticKernel.Connectors.Qdrant
from1.6.2-alpha
to1.10.0-alpha
. - Updated
Microsoft.SemanticKernel.Core
from1.6.2
to1.10.0
. - Updated
Microsoft.SemanticKernel.Plugins.Document
from1.6.2-alpha
to1.10.0-alpha
. - Updated
Microsoft.SemanticKernel.Plugins.Memory
from1.6.2-alpha
to1.10.0-alpha
. - Updated
SharpToken
from1.2.17
to2.0.2
. - Updated
System.Text.Json
from8.0.2
to8.0.3
. - Updated
coverlet.collector
from6.0.1
to6.0.2
. - Updated
xunit
from2.7.0
to2.7.1
. - Updated
xunit.analyzers
from1.11.0
to1.12.0
. - Updated
xunit.extensibility.core
from2.7.0
to2.7.1
. - Updated
xunit.runner.visualstudio
from2.5.7
to2.5.8
.
- Updated
- Added new methods to interface type
IDocumentConnectorProvider
:- New overload of
GetDocumentConnector
that receives a boolean value to throw an exception if a connector for the specified file extension is not found. - New method
SupportedFileExtension
to check if a file extension is supported by the current instance of theIDocumentConnectorProvider
. - New method
AddDocumentConnector
to add (or replace) a document connector in the current instance of theIDocumentConnectorProvider
for a specific file extension.
- New overload of
- Added new class
DocumentConnectorProviderBase
which provides a default base implementation ofIDocumentConnectorProvider
. - Added new document connector to read Excel files (xlsx)
ExcelToMarkdownDocumentConnector
.
- Added
CosineStringSimilarityComparer
inEncamina.Enmarcha.SemanticKernel
to compare two strings using cosine similarity algorithm. - Class
SlidePptxDocumentConnector
is nowpublic
instead ofinternal
. - Added
UseAzureActiveDirectoryAuthentication
andTokenCredentialsOptions
properties inAzureOpenAIOptions
. - Added
RequiredIfAttribute
to validate properties based on the value of another property. - Fixed some warnings in:
Encamina.Enmarcha.AI
.Encamina.Enmarcha.AspNet
- Corrected a typo in the Spanish error message in
ResponseMessages.es.resx
from "ha encontrar" to "ha encontrado".
- In
AzureOpenAIOptions
the default value ofServiceVersion
changes fromV2023_12_01_Preview
toV2024_02_15_Preview
since the former is deprecated. - In the
QuestionAnsweringFromMemoryQuery
function of theQuestionAnsweringPlugin
, anull
value is no longer returned when there are no relevant memory results. Instead, the execution flow continues, prompting a message with an empty context information, ultimately resulting in a response such as "I don't know" or a similar message. - Added a new method
GetDocumentContentAsync
to theIDocumentContentExtractor
interface, which is now required to be implemented.
- In interface type
IChatHistoryProvider
added new methodDeleteChatMessagesHistoryAsync
to delete a user's chat history messages. This method is implemented inChatHistoryProvider
. - Added new interface
Encamina.Enmarcha.AI.Abstractions.ISemanticTextSplitter
and its implementationsEncamina.Enmarcha.AI.SemanticTextSplitter
to split a text into meaningful chunks based on embeddings. - Added a new utility class for mathematical operations
Encamina.Enmarcha.Core.MathUtils
. - Fixed
DeleteAsync<TEntityId>
method inCosmosRepository<T>
. This method was always throwing exceptions because the partition key value was alwaysnull
. It is fixed by considering theId
to delete the whole partition. If a specific item in the partition should be removed, then use theDeleteAsync
on-generic method. - Added
DefaultDocumentContentSemanticExtractor
to retrieve semantic chunks from documents. - Bug fix in the
MathUtils.Quartiles
method. - Enhanced
SplitAsync
inEncamina.Enmarcha.AI.SemanticTextSplitter
to iteratively split chunks exceedingoptions.MaxChunkSize
with a retry limit ofoptions.ChunkSplitRetryLimit
. - Updated dependencies:
- Updated
Bogus
from35.4.0
to35.4.1
. - Updated
Azure.Core
from1.37.0
to1.38.0
. - Updated
Azure.OpenAI
from1.0.0-beta13
to1.0.0-beta14
. - Updated
MailKit
from4.3.0
to4.4.0
. - Updated
MimeKit
from4.3.0
to4.4.0
. - Updated
Microsoft.Bot.Builder.Azure
from4.22.1
to4.22.2
. - Updated
Microsoft.Bot.Builder.Azure.Blobs
from4.22.1
to4.22.2
. - Updated
Microsoft.Bot.Builder.Dialogs
from4.22.1
to4.22.2
. - Updated
Microsoft.Bot.Builder.Integration.ApplicationInsights.Core
from4.22.1
to4.22.2
. - Updated
MMicrosoft.Bot.Builder.Integration.AspNet.Core
from4.22.1
to4.22.2
. - Updated
Microsoft.SemanticKernel.Abstractions
from1.4.0
to1.6.2
. - Updated
Microsoft.SemanticKernel.Connectors.AzureAISearch
from1.4.0-alpha
to1.6.2-alpha
. This does fix the Issue 72. - Updated
Microsoft.SemanticKernel.Connectors.OpenAI
from1.4.0
to1.6.2
. - Updated
Microsoft.SemanticKernel.Connectors.Qdrant
from1.4.0-alpha
to1.6.2-alpha
. - Updated
Microsoft.SemanticKernel.Core
from1.4.0
to1.6.2
. - Updated
Microsoft.SemanticKernel.Plugins.Document
from1.4.0-alpha
to1.6.2-alpha
. - Updated
Microsoft.SemanticKernel.Plugins.Memory
from1.4.0-alpha
to1.6.2-alpha
. - Updated
SharpToken
from1.2.15
to1.2.17
. - Updated
coverlet.collector
from6.0.0
to6.0.1
. - Updated
xunit
from2.6.6
to2.7.0
. - Updated
xunit.analyzers
from1.10.0
to1.11.0
. - Updated
xunit.extensibility.core
from2.6.6
to2.7.0
. - Updated
xunit.runner.visualstudio
from2.5.6
to2.5.7
.
- Updated
- Changes in the prompt of
QuestionAnsweringPlugin
to enhance language detection in the response. - Slight improvement in the
DeleteAsync
method inCosmosRepository
. - Some boy scouting and typo fixes in comments.
- Added new extension method to add Qdrant and Azure Search AI as Keyed Memory Store.
- Added new function to delete chat messages history in
ChatWithHistoryPlugin
. - Added new model
gpt-4-turbo
toModelInfo
.
Some features from Semantic Kernel
that we might have been using, are marked as experimental and produce warnings that do not allow the compilation of the code. To use these features, these warnings must be ignored explicitly per project. The following is a list of these warnings and the affected projects:
- SKEXP0001:
Encamina.Enmarcha.SemanticKernel.Abstractions
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
Encamina.Enmarcha.SemanticKernel.Plugins.Memory
Encamina.Enmarcha.SemanticKernel.Plugins.QuestionAnswering
Encamina.Enmarcha.Samples.SemanticKernel.QuestionAnswering
- SKEXP0010:
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
Encamina.Enmarcha.Samples.SemanticKernel.QuestionAnswering
- SKEXP0020:
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
- SKEXP0050:
Encamina.Enmarcha.SemanticKernel.Connectors.Document
Encamina.Enmarcha.Samples.SemanticKernel.QuestionAnswering
Some warnings have also been removed with the new Semantic Kernel
updates.
- SKEXP0003:
Encamina.Enmarcha.Samples.SemanticKernel.QuestionAnswering
Encamina.Enmarcha.SemanticKernel
Encamina.Enmarcha.SemanticKernel.Abstractions
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
Encamina.Enmarcha.SemanticKernel.Plugins.Memory
Encamina.Enmarcha.SemanticKernel.Plugins.QuestionAnswering
- SKEXP0011:
Encamina.Enmarcha.Samples.SemanticKernel.QuestionAnswering
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
- SKEXP0021:
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
- SKEXP0026:
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
- SKEXP0051:
Encamina.Enmarcha.SemanticKernel.Connectors.Document
- SKEXP0052:
Encamina.Enmarcha.Samples.SemanticKernel.QuestionAnswering
- Updated dependencies:
- Updated
Microsoft.AspNetCore.Authentication.JwtBearer
from8.0.1
to8.0.2
. - Updated
Microsoft.AspNetCore.Authentication.OpenIdConnect
from8.0.1
to8.0.2
. - Updated
Microsoft.Azure.Cosmos
from3.38.0
to3.38.1
. - Updated
Microsoft.EntityFrameworkCore
from8.0.1
to8.0.2
. - Updated
Microsoft.EntityFrameworkCore.SqlServer
from8.0.1
to8.0.2
. - Updated
Microsoft.Extensions.Azure
from1.7.1
to1.7.2
. - Updated
Microsoft.Extensions.Options
from8.0.1
to8.0.2
. - Updated
Microsoft.NET.Test.Sdk
from17.8.0
to17.9.0
. - Updated
Microsoft.SemanticKernel.Abstractions
from1.3.1
to1.4.0
. - Updated
Microsoft.SemanticKernel.Connectors.AzureAISearch
from1.3.1-alpha
to1.4.0-alpha
. This does fix the Issue 72. - Updated
Microsoft.SemanticKernel.Connectors.OpenAI
from1.3.1
to1.4.0
. - Updated
Microsoft.SemanticKernel.Connectors.Qdrant
from1.3.1-alpha
to1.4.0-alpha
. - Updated
Microsoft.SemanticKernel.Core
from1.3.1
to1.4.0
. - Updated
Microsoft.SemanticKernel.Plugins.Document
from1.3.1-alpha
to1.4.0-alpha
. - Updated
Microsoft.SemanticKernel.Plugins.Memory
from1.3.1-alpha
to1.4.0-alpha
. - Updated
System.Text.Json
from8.0.1
to8.0.2
.
- Updated
- Bug fix (Issue 72). Removed
MemoryStoreExtender
workaround after updating toMicrosoft.SemanticKernel.Connectors.AzureAISearch
version1.4.0-alpha
which resolves the issue.
- Removed
HistoryMaxMessages
property fromChatWithHistoryPluginOptions
as part of a refactor to improve the configuration management of chat history. This property is now available within a new dedicated classChatHistoryProviderOptions
, which is designed to configure aspects of theIChatHistoryProvider
implementation. - The method
ImportChatWithHistoryPluginUsingCosmosDb
has been renamed toImportChatWithHistoryPlugin
to reflect its decoupling from the specific storage implementation and to align with the newIChatHistoryProvider
abstraction. This change requires consumers to update their method calls to match the new signature, and to provide an instance ofIChatHistoryProvider
in the dependency container. You can useAddCosmosChatHistoryProvider
to add an instance ofIChatHistoryProvider
that uses Azure Cosmos DB for storing chat histories. - Modified the
ChatAsync
method signature inChatWithHistoryPlugin
by changing the order of parameters and makinguserName
andlocale
optional. This change requires consumers to update their method calls to match the new signature. - The
KernelExtensions.cs
andChatWithHistoryPluginOptions.cs
files inEncamina.Enmarcha.SemanticKernel.Plugins.Chat
had been moved to a new location to better align with the project's structure.
- Introduced
IChatHistoryProvider
interface and its corresponding implementationChatHistoryProvider
. This new abstraction layer provides a more flexible and decoupled way to work with chat history. - Added a new extension method
AddCosmosChatHistoryProvider
to the service collection extensions. This method streamlines the setup and registration ofIChatHistoryProvider
that uses Azure Cosmos DB for storing chat histories. - Removed direct dependency on
IAsyncRepository<ChatMessageHistoryRecord>
inChatWithHistoryPlugin
, now relying onIChatHistoryProvider
for chat history management. - Added new calculation methods
LengthChatMessage
andLengthChatMessageWithEncoding
inILengthFunctions
to determine the length of chat messages considering the author's role. - Updated dependencies:
- Updated
Azure.AI.OpenAI
from1.0.0-beta12
to1.0.0-beta13
(which provides some fixes for Function Calling). - Updated
Azure.Data.Tables
from12.8.2
to12.8.3
. - Updated
Microsoft.Bot.Builder.Azure
from4.22.0
to4.22.1
. - Updated
Microsoft.Bot.Builder.Azure.Blobs
from4.22.0
to4.22.1
. - Updated
Microsoft.Bot.Builder.Dialogs
from4.22.0
to4.22.1
. - Updated
Microsoft.Bot.Builder.Integration.ApplicationInsights.Core
from4.22.0
to4.22.1
. - Updated
MMicrosoft.Bot.Builder.Integration.AspNet.Core
from4.22.0
to4.22.1
. - Updated
Microsoft.Semantic Kernel
from1.3.0
to1.3.1
. - Updated
Microsoft.SemanticKernel.Connectors.AzureAISearch
from1.3.0-alpha
to1.3.1-alpha
. Important: this does not fix the issue detected by ENMARCHA and reported in Issue 72. - Updated
Microsoft.SemanticKernel.Connectors.Qdrant
from1.3.0-alpha
to1.3.1-alpha
. - Updated
Microsoft.SemanticKernel.Plugins.Document
from1.3.0-alpha
to1.3.1-alpha
. - Updated
Microsoft.SemanticKernel.Plugins.Memory
from1.3.0-alpha
to1.3.1-alpha
. - Updated
SharpToken
from1.2.14
to1.2.15
.
- Updated
- Added
Description
property inVersionSwaggerGenOptions
. - New text prompt function for extract KeyPhrases with specified locale,
KeyPhrasesLocaled
. - Added an example of using
KeyPhrasesLocaled
inEncamina.Enmarcha.Samples.SemanticKernel.Text
. - New text prompt function for translate texts,
Translate
. - Added an example of using
Translate
inEncamina.Enmarcha.Samples.SemanticKernel.Text
. - Bug fix: Temporary workaround for handling Http NotFound exception in
MemoryStoreExtender
. (#72) - Added new method
ExistsMemoryAsync
inMemoryStoreExtender
. - Added a new optional parameter
Locale
to the functions ofQuestionAnsweringPlugin
, to specify the language of the response. - Improved memory store event types, when they are raised and the data inside the arguments.
- Added new package
Encamina.Enmarcha.AspNet.OpenApi
with some goodies for OpenAPI. Currently, it adds the following:GroupNameKeyAuthorizationMiddleware
a middleware that provides key authorization for OpenAPI specifications based on the group name of an API.GroupNameKeyAuthenticationOptions
an options class to configure theGroupNameKeyAuthorizationMiddleware
.- Extensions method on
IApplicationBuilder
to add theGroupNameKeyAuthorizationMiddleware
. For more information, refer to the packageREADME.md
.
- Adjusted package references in
Encamina.Enmarcha.SemanticKernel.csproj
to includeEncamina.Enmarcha.Data.Abstractions
.
This version updates the Semantic Kernel
library from version 1.1.0
to 1.3.0
, which introduces minor changes in the code, mostly internal dependencies.
For more information about these changes, please visit the following links:
- Replace dependency with
IMemoryStore
forIMemoryManager
in abstract classMemoryStoreHandlerBase
. This affects internal types like theEphemeralMemoryStoreHandler
. - Removed visibility modifiers in
IMemoryManager
interface. - Signature of
UpsertMemoryAsync
method has changed inIMemoryManager
interface. - Signature of
BatchUpsertMemoriesAsync
method has changed inIMemoryManager
interface. - Dependency with
Kernel
has been removed inMemoryManager
class. Also, added dependency withILogger
. - Added method overloads to pass
Encamina.Enmarcha.AI.Abstractions.TextSplitterOptions
when splitting text inEncamina.Enmarcha.AI.Abstractions.ITextSplitter
and its implementations.
- Method
GetDocumentConnector
inDocumentContentExtractorBase
is nowpublic
instead ofprotected
. - New
MemoryManager
property of typeIMemoryManager
inIMemoryStoreHandler
interface to get read-only access to the underlaying memory manager. - New
MemoryStore
property of typeIMemoryStore
inIMemoryManager
interface to get read-only access to the underlaying memory store. - Removed unnecessary
Guards
when adding a Memory Manager and the Ephemeral Memory Store Handler. The exceptions will be thrown by the DI engine itself. - Added new class
AzureAISearchOptions
to configure connection parameters for Azure AI Search. - Added new extension method
AddAzureAISearchMemoryStore
to add Azure AI Search as a valid vector database for aIMemoryStore
instance. - Improved extensions methods for adding
IMemoryStore
to consider debouncing when monitoring changes in parameters. - Updated dependencies:
- Updated
Semantic Kernel
from1.1.0
to1.3.0
(third final version ofSemantic Kernel
). - Updated
Microsoft.Azure.Cosmos
from version3.37.1
to3.38.0
. - Updated
Microsoft.Bot.Builder.Azure
from version4.21.2
to4.22.0
. - Updated
Microsoft.Bot.Builder.Azure.Blobs
from version4.21.2
to4.22.0
. - Updated
Microsoft.Bot.Builder.Dialogs
from version4.21.2
to4.22.0
. - Updated
Microsoft.Bot.Builder.Integration.ApplicationInsights.Core
from version4.21.2
to4.22.0
.
- Updated
- Properties
CollectionNamePostfix
andCollectionNamePrefix
fromMemoryStoreHandlerBase
are nowvirtual
instead ofabstract
. - In
EphemeralMemoryStoreHandler
, propertyCollectionNamePrefix
has the valueephemeral-
fixed. - Fixed some typos and grammatical errors (mostly on code comments).
- Added new extension method
AddDefaultDocumentConnectorProvider
inEncamina.Enmarcha.SemanticKernel.Connectors.Document
to get access to a default implementation of aIDocumentConnector
. - Updated sample projects with latest changes.
- Overloaded
AddDefaultDocumentConnectorProvider
andAddDefaultDocumentContentExtractor
methods with a parameter to pass a function to calculate the length of a text and inject it as a dependency. - Added
README.md
files to all projects in the solution when publishing to NuGet.org. - Added event handler for
IMemoryStore
operations. - Added new extension method
GetKernelPromptAsync
inEncamina.Enmarcha.SemanticKernel.Extensions.KernelExtensions
to retrieve the final prompt for a given prompt using the arguments. - Added new extension method
GetKernelFunctionUsedTokensFromPromptAsync
inEncamina.Enmarcha.SemanticKernel.Extensions.KernelExtensions
to obtain the total number of tokens used in generating a prompt from an inline prompt function. - Fixed
GetMaxTokensFromKernelFunction
inEncamina.Enmarcha.SemanticKernel.Extensions.KernelExtensions
. Now, it considers whether the arguments are of typeOpenAIPromptExecutionSettings
when obtaining the MaxTokens. - New
IMemoryStoreExtender
type which obsolesces theIMemoryManager
type and its references. If you are usingIMemoryManager
start a plan to replace it withIMemoryStoreExtender
. - Added default values for
TextSplitterOptions
to allow using it without explicit configuration. - Some code improvements to use .NET 8 and C# 12 features.
- Added new
Debouncer
class to provide mechanisms to prevent multiple calls to a method or event.
- Fixed
BuildConfiguration
not set to Release in.github/workflows/main.yml
for the main branch. (#31)
This version updates the Semantic Kernel
library from version 1.0.0-beta8
to 1.1.0
, which introduces a lot of breaking changes in the code.
Sadly, some features from Semantic Kernel
that we might have been using, are marked as experimental and produce warnings that do not allow the compilation of the code. To use these features, these warnings must be ignored explicitly per project. The following is a list of these warnings and the affected projects:
- SKEXP0001:
Encamina.Enmarcha.SemanticKernel
- SKEXP0003:
Encamina.Enmarcha.SemanticKernel
Encamina.Enmarcha.SemanticKernel.Abstractions
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
Encamina.Enmarcha.SemanticKernel.Plugins.Memory
Encamina.Enmarcha.SemanticKernel.Plugins.QuestionAnswering
- SKEXP0011:
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
- SKEXP0026:
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
- SKEXP0051:
Encamina.Enmarcha.SemanticKernel.Connectors.Document
More information about these warnings is available here: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/docs/EXPERIMENTS.md
- Replaced class
Completition
forCompletion
inEncamina.Enmarcha.AI.OpenAI.Abstractions
. It was misspelled. - Class
SemanticKernelOptions
does not exists anymore. It has been replaced byAzureOpenAIOptions
fromEncamina.Enmarcha.AI.OpenAI.Abstractions
. - The following references were updated due to changes in
Semantic Kernel
version1.0.1
: - Changed
IKernel
forKernel
. - Changed
ISKFunction
forKernelFunction
orKernelPlugin
. - Changed
SKFunction
forKernelFunction
. - Changed
ContextVariables
forKernelArguments
. - Changed
kernel.Functions.GetFunction(...)
forkernel.Plugins[<name of plugin>][<name of function>]
. - Changed
OpenAIRequestSettings
forOpenAIPromptExecutionSettings
. - Removed extension methods for
SKContext
because that class does not exists anymore inSemantic Kernel
. - Due to the breaking nature of the new version of
Semantic Kernel
, the following extension methods are not available any more and have been replace by new methods, and it was not possible to marked it asObsolete
:GetSemanticFunctionPromptAsync
is replaced byGetKernelFunctionPromptAsync
.GetSemanticFunctionUsedTokensAsync
is replaced byGetKernelFunctionUsedTokensAsync
.ImportSemanticPluginsFromAssembly
is replaced byImportPromptFunctionsFromAssembly
.
- Extension method
GetSemanticFunctionPromptAsync
is no longer available. It is replaced byGetKernelFunctionPromptAsync
. - Extension method
ImportQuestionAnsweringPlugin
has different signature. - Extension method
ImportQuestionAnsweringPluginWithMemory
has different signature. - Extension method
ImportChatWithHistoryPluginUsingCosmosDb
has different signature. - The format of prompt function configuration files
config.json
has been modified.
- Updated
Semantic Kernel
from1.0.0-beta8
to1.1.0
(second final version ofSemantic Kernel
). - Updated
Azure.Core
from version1.36.0
to1.37.0
. - Updated
Azure.AI.OpenAI
from version1.0.0-beta.6
to1.0.0-beta.12
. - Updated
Bogus
from version34.0.2
to35.4.0
. - Updated
Microsoft.AspNetCore.Authentication.JwtBearer
from version8.0.0
to8.0.1
. - Updated
Microsoft.AspNetCore.Authentication.OpenIdConnect
from version8.0.0
to8.0.1
. - Updated
Microsoft.Azure.Cosmos
from version3.37.0
to3.37.1
. - Updated
Microsoft.EntityFrameworkCore
from version8.0.0
to8.0.1
. - Updated
Microsoft.Extensions.Options
from version8.0.0
to8.0.1
. - Updated
SharpToken
from version1.2.12
to1.2.14
. - Updated
xunit
from version2.6.2
to2.6.6
. - Updated
xunit.analyzers
from version1.6.0
to1.10.0
. - Updated
xunit.extensibility.core
from version2.6.2
to2.6.6
. - Updated
xunit.runner.visualstudio
from version2.5.4
to2.5.6
. - Updated
StyleCop.Analyzers
from version1.2.0-beta.507
to1.2.0-beta.556
. - Updated
System.Text.Json
from version8.0.0
to8.0.1
. - Updated version from
8.0.3
to8.1.0
due to all the major and breaking changes. - Updated some
README.md
files changingIKernel
forKernel
. - Updated and added new unit tests to cover the main "happy path" of implementations that use
Semantic Kernel
.
- Replaced reference
Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer
(version5.1.0
) forAsp.Versioning.Mvc.ApiExplorer
(version8.0.0
) which is the new name and implementation of the ASP.NET versioning libraries. - Updated prompt function configuration files (
config.json
) to new format. - Renamed files
IKernelExtensions
toKernelExtensions.cs
. - Fixed token counting in
ChatWithHistoryPlugin.cs
. - Updated sample projects.
- Fixed some typos and grammatical errors.
- Add gpt-35-turbo-16k and gpt-3.5-turbo-16k model implementation allowed
- In
Encamina.Enmarcha.SemanticKernel.Plugins.Text
Summarize Plugin, a new parameterlocale
has been added to control the output language of the generated summary. (#34)
- In
Encamina.Enmarcha.SemanticKernel.Abstractions.ILengthFunctions
,GptEncoding
is now cached and reused to improve performance. (#30)
- Changes from version 8.0.0 have been added to the
CHANGELOG.md
file.
- Changed .NET version from 6 to 8, therefore closes issue
Everything ready for ENMARCHA 8.0.0 #7
. - Updated the following .NET libraries to their newest version (8.0.0):
- Microsoft.AspNetCore.Authentication.JwtBearer
- Microsoft.AspNetCore.Authentication.OpenIdConnect
- Microsoft.EntityFrameworkCore
- Microsoft.EntityFrameworkCore.SqlServer
- Microsoft.Extensions.Caching.Abstractions
- Microsoft.Extensions.Configuration.Abstractions
- Microsoft.Extensions.DependencyInjection.Abstractions
- Microsoft.Extensions.Hosting
- Microsoft.Extensions.Http
- Microsoft.Extensions.Logging.Abstractions
- Microsoft.Extensions.Options
- Microsoft.Extensions.Options.ConfigurationExtensions
- Microsoft.Extensions.Options.DataAnnotations
- System.Net.Http.Json
- System.Text.Json
- Updated library Azure.Data.Tables from 12.8.1 to 12.8.2.
- Updated library Microsoft.Azure.Cosmos from 3.36.0 to 3.37.0.
- Updated Bot Framework related libraries from version 4.21.1 to 4.21.2. These libraries are:
- Microsoft.Bot.Builder.Azure
- Microsoft.Bot.Builder.Azure.Blobs
- Microsoft.Bot.Builder.Dialogs
- Microsoft.Bot.Builder.Integration.ApplicationInsights.Core
- Microsoft.Bot.Builder.Integration.AspNet.Core
- Updated library Moq from 4.20.69 to 4.20.70.
- Updated library xunit from 2.6.1 to 2.6.2.
- Updated library xunit.analyzers from 1.5.0 to 1.6.0.
- Updated library xunit.extensibility.core from 2.6.1 to 2.6.2.
- Updated library xunit.runner.visualstudio from 2.5.3 to 2.5.4.
- Some minor tweaks.
This version updates the Semantic Kernel
library to version 1.0.0-beta8
, which introduces a lot of breaking changes in the code that mostly translate into multiple obsolescence warnings. Eventually, newer versions of this library will fix these warnings once a final version of Semantic Kernel
is used.
The main motivation for this update is to take advantage of the latest improvements in the Semantic Kernel
library, like the Stepwise Planner
or Function Calls, plus better integrations with LLMs like OpenAI, among many other improvements.
Sadly, some warnings regarding types or members obsolescence could not be addresses until the Microsoft team behind Semantic Kernel
provides a final version of the library. So far, these warnings are:
- CS0618: IKernel.PromptTemplateEngine' is obsolete: 'PromptTemplateEngine has been replaced with PromptTemplateFactory and will be null. If you pass an PromptTemplateEngine instance when creating a Kernel it will be wrapped in an instance of IPromptTemplateFactory. This will be removed in a future release.
- CS0618: ISKFunction.RequestSettings' is obsolete: 'Use PromptTemplateConfig.ModelSettings instead. This will be removed in a future release.
- CS0618: ISKFunction.SkillName' is obsolete: 'Methods, properties and classes which include Skill in the name have been renamed. Use ISKFunction.SkillName instead. This will be removed in a future release.
- Updated
Semantic Kernel
libraries to version1.0.0-beta8
. Encamina.Enmarcha.SemanticKernel.Abstractions
- Removed method
ValidateAndThrowIfErrorOccurred
. - Removed properties
ChatModelName
,CompletionsModelName
, andEmbeddingsModelName
fromSemanticKernelOptions
.
- Removed method
- The following methods do not throw an
ArgumentException
if the instance ofISKFunction
is not a semantic function, since nowSemantic Kernel
does not longer differentiates between Semantic and Native functions:- GetSemanticFunctionPromptAsync
- GetSemanticFunctionUsedTokensAsync
- The extension method
ImportQuestionAnsweringPlugin
inEncamina.Enmarcha.SemanticKernel.Plugins.QuestionAnswering
does not import the Memory plugin anymore. If the usage of the Question Answering plugin requires memory support, use theImportQuestionAnsweringPluginWithMemory
extension method instead. Remember to add a valid instance ofISemanticTextMemory
as a service in the dependency container.
- New extension method
AddSemanticTextMemory
inEncamina.Enmarcha.SemanticKernel.Connectors.Memory
to add a semantic text memory (i.e.,ISemanticTextMemory
) to the dependency container. - New extension method
ImportQuestionAnsweringPluginWithMemory
inEncamina.Enmarcha.SemanticKernel.Plugins.QuestionAnswering
to support memories when getting context for the Question Answering plugin. Remember to add a valid instance ofISemanticTextMemory
as a service in the dependency container. - Added
Directory.Build.targets
at Samples level to prevent generating NuGet packages of these projects.
- Renamed sample projects to match Microsoft's naming conventions.
- Sample projects also use the new
Semantic Kernel
library version1.0.0-beta8
. - Some boy scouting by editing the comments in the code to have correct grammar and fixing some StyleCop warnings.
- Added this
CHANGELOG.md
- In
Encamina.Enmarcha.SemanticKernel.Abstractions
, methodValidateAndThrowIfErrorOccurred
is now obsolete, and will be removed in a future version of this library. - In
Encamina.Enmarcha.SemanticKernel.Plugins.Chat
, propertyChatRequestSettings
is now obsolete due to future changes in Semantic Kernel library its typeChatRequestSettings
will change toOpenAIRequestSettings
. Therefore, the signature of this property will change in future versions of this library. - In
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
, the constructor ofMemoryQueryPlugin
is now obsolete due to future changes in Semantic Kernel library, where the semantic memory will be a dependency outside theIKernel
. TheIKernel
dependency will be replaced withISemanticTextMemory
. The signature of this constructor will change in future versions of this library. - In
Encamina.Enmarcha.SemanticKernel.Connectors.Memory
, the extension methodImportMemoryPlugin
is now obsolete due to future changes in Semantic Kernel library, where the semantic memory will be a dependency outside theIKernel
. An additional dependency withISemanticTextMemory
will be added to this extension method. The signature of this method will change in future versions of this library.
- First Open Source versions of ENMARCHA.