Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Enable the InMemoryTextSearchTests #9255

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/dotnet-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ jobs:
OpenAIAudioToText__ModelId: ${{ vars.OPENAIAUDIOTOTEXT__MODELID }}
OpenAITextToImage__ApiKey: ${{ secrets.OPENAITEXTTOIMAGE__APIKEY }}
OpenAITextToImage__ModelId: ${{ vars.OPENAITEXTTOIMAGE__MODELID }}
OpenAIEmbeddings__ApiKey: ${{ secrets.OPENAIEMBEDDINGS__APIKEY }}
OpenAIEmbeddings__ModelId: ${{ vars.OPENAIEMBEDDINGS__MODELID }}
AzureOpenAITextToAudio__ApiKey: ${{ secrets.AZUREOPENAITEXTTOAUDIO__APIKEY }}
AzureOpenAITextToAudio__Endpoint: ${{ secrets.AZUREOPENAITEXTTOAUDIO__ENDPOINT }}
AzureOpenAITextToAudio__DeploymentName: ${{ vars.AZUREOPENAITEXTTOAUDIO__DEPLOYMENTNAME }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,70 +6,26 @@
using Microsoft.SemanticKernel.Connectors.InMemory;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using Microsoft.SemanticKernel.Data;
using SemanticKernel.IntegrationTests.Data;
using SemanticKernel.IntegrationTests.TestSettings;
using Xunit;

namespace SemanticKernel.IntegrationTests.Data;
namespace SemanticKernel.IntegrationTests.Connectors.Memory.InMemory;

/// <summary>
/// Integration tests for using <see cref="InMemoryVectorStore"/> with <see cref="ITextSearch"/>.
/// </summary>
public class InMemoryVectorStoreTextSearchTests : BaseVectorStoreTextSearchTests
{
// If null, all tests will be enabled
private const string SkipReason = "Failing in integration test pipeline so disabling while investigating a fix (issue 9168)";

[Fact(Skip = SkipReason)]
public override async Task CanSearchAsync()
{
await base.CanSearchAsync();
}

[Fact(Skip = SkipReason)]
public override async Task CanGetTextSearchResultsAsync()
{
await base.CanGetTextSearchResultsAsync();
}

[Fact(Skip = SkipReason)]
public override async Task CanGetSearchResultsAsync()
{
await base.CanGetSearchResultsAsync();
}

[Fact(Skip = SkipReason)]
public override async Task UsingTextSearchWithAFilterAsync()
{
await base.UsingTextSearchWithAFilterAsync();
}

[Fact(Skip = SkipReason)]
public override async Task FunctionCallingUsingCreateWithSearchAsync()
{
await base.FunctionCallingUsingCreateWithSearchAsync();
}

[Fact(Skip = SkipReason)]
public override async Task FunctionCallingUsingCreateWithGetSearchResultsAsync()
{
await base.FunctionCallingUsingCreateWithGetSearchResultsAsync();
}

[Fact(Skip = SkipReason)]
public override async Task FunctionCallingUsingGetTextSearchResultsAsync()
{
await base.FunctionCallingUsingGetTextSearchResultsAsync();
}

/// <inheritdoc/>
public async override Task<ITextSearch> CreateTextSearchAsync()
{
if (this.VectorStore is null)
{
OpenAIConfiguration? openAIConfiguration = this.Configuration.GetSection("OpenAIEmbeddings").Get<OpenAIConfiguration>();
Assert.NotNull(openAIConfiguration);
Assert.NotEmpty(openAIConfiguration.ModelId);
Assert.NotEmpty(openAIConfiguration.ApiKey);
Assert.NotNull(openAIConfiguration.ModelId);
Assert.NotNull(openAIConfiguration.ApiKey);
this.EmbeddingGenerator = new OpenAITextEmbeddingGenerationService(openAIConfiguration.ModelId, openAIConfiguration.ApiKey);

// Delegate which will create a record.
Expand Down
Loading