Skip to content

Commit

Permalink
feat: Updated to latest LangChain.Databases.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Sep 18, 2024
1 parent d7c1849 commit 551687d
Show file tree
Hide file tree
Showing 8 changed files with 309 additions and 222 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="LangChain.Databases.Sqlite" Version="0.15.2" />
<PackageReference Include="LangChain.Databases.Sqlite" Version="0.15.3-dev.37" />
<PackageReference Include="LangChain.Providers.Abstractions" Version="0.15.2" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
</ItemGroup>
Expand Down
97 changes: 0 additions & 97 deletions src/Core/src/Memory/BaseChatMessageHistory.cs

This file was deleted.

40 changes: 0 additions & 40 deletions src/Core/src/Memory/ChatMessageHistory.cs

This file was deleted.

81 changes: 0 additions & 81 deletions src/Core/src/Memory/FileChatMessageHistory.cs

This file was deleted.

8 changes: 5 additions & 3 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="LangChain.Databases.Abstractions" Version="0.15.2" />
<PackageVersion Include="LangChain.Databases.InMemory" Version="0.15.2" />
<PackageVersion Include="LangChain.Databases.Sqlite" Version="0.15.2" />
<PackageVersion Include="LangChain.Databases.Abstractions" Version="0.15.3-dev.37" />
<PackageVersion Include="LangChain.Databases.InMemory" Version="0.15.3-dev.37" />
<PackageVersion Include="LangChain.Databases.OpenSearch" Version="0.15.3-dev.37" />
<PackageVersion Include="LangChain.Databases.Sqlite" Version="0.15.3-dev.37" />
<PackageVersion Include="LangChain.Providers.Abstractions" Version="0.15.2" />
<PackageVersion Include="LangChain.Providers.Amazon.Bedrock" Version="0.15.2" />
<PackageVersion Include="LangChain.Providers.Anthropic" Version="0.15.2" />
Expand All @@ -34,6 +35,7 @@
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Testcontainers" Version="3.10.0" />
<PackageVersion Include="tryAGI.OpenAI" Version="3.7.0" />
<PackageVersion Include="MSTest.TestAdapter" Version="3.5.1" />
<PackageVersion Include="MSTest.TestFramework" Version="3.5.1" />
Expand Down
26 changes: 26 additions & 0 deletions src/Meta/test/DatabaseTestEnvironment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using DotNet.Testcontainers.Containers;
using LangChain.Providers;

namespace LangChain.Databases.IntegrationTests;

public sealed class DatabaseTestEnvironment : IAsyncDisposable
{
public required IVectorDatabase VectorDatabase { get; set; }
public IEmbeddingModel? EmbeddingModel { get; set; }
public int Port { get; set; }
public string CollectionName { get; set; } = "test" + Guid.NewGuid().ToString("N");
public int Dimensions { get; set; } = 1536;
public IContainer? Container { get; set; }

public async ValueTask DisposeAsync()
{
if (Container != null)
{
await Container.DisposeAsync();
}
if (VectorDatabase is IDisposable disposable)
{
disposable.Dispose();
}
}
}
Loading

0 comments on commit 551687d

Please sign in to comment.