Skip to content

Commit 15c5247

Browse files
authored
Merge branch 'SciSharp:master' into feature-llamareranker
2 parents 6f4c53c + 5e0c95f commit 15c5247

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

LLama.Unittest/LLamaEmbedderTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ private async Task CompareEmbeddings(string modelPath)
4545
var generator = (IEmbeddingGenerator<string, Embedding<float>>)embedder;
4646
Assert.NotNull(generator.GetService<EmbeddingGeneratorMetadata>());
4747
Assert.Equal(nameof(LLamaEmbedder), generator.GetService<EmbeddingGeneratorMetadata>()?.ProviderName);
48-
Assert.NotNull(generator.GetService<EmbeddingGeneratorMetadata>()?.ModelId);
49-
Assert.NotEmpty(generator.GetService<EmbeddingGeneratorMetadata>()?.ModelId!);
48+
Assert.NotNull(generator.GetService<EmbeddingGeneratorMetadata>()?.DefaultModelId);
49+
Assert.NotEmpty(generator.GetService<EmbeddingGeneratorMetadata>()?.DefaultModelId!);
5050
Assert.Same(embedder, generator.GetService<LLamaEmbedder>());
5151
Assert.Same(generator, generator.GetService<IEmbeddingGenerator<string, Embedding<float>>>());
5252
Assert.Null(generator.GetService<string>());

LLama/LLamaEmbedder.EmbeddingGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public partial class LLamaEmbedder
2222
{
2323
return _metadata ??= new(
2424
nameof(LLamaEmbedder),
25-
modelId: Context.NativeHandle.ModelHandle.ReadMetadata().TryGetValue("general.name", out var name) ? name : null,
26-
dimensions: EmbeddingSize);
25+
defaultModelId: Context.NativeHandle.ModelHandle.ReadMetadata().TryGetValue("general.name", out var name) ? name : null,
26+
defaultModelDimensions: EmbeddingSize);
2727
}
2828

2929
if (serviceType?.IsInstanceOfType(Context) is true)

LLama/LLamaSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<ItemGroup>
5252
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.4.0" />
5353
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.3" />
54-
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.3.0-preview.1.25161.3" />
54+
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.4.0-preview.1.25207.5" />
5555
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.3" />
5656
<PackageReference Include="System.Numerics.Tensors" Version="9.0.3" />
5757
</ItemGroup>

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ There are integrations for the following libraries, making it easier to develop
6565
- [kernel-memory](https://github.com/microsoft/kernel-memory): a multi-modal AI Service specialized in the efficient indexing of datasets through custom continuous data hybrid pipelines, with support for RAG ([Retrieval Augmented Generation](https://en.wikipedia.org/wiki/Prompt_engineering#Retrieval-augmented_generation)), synthetic memory, prompt engineering, and custom semantic memory processing.
6666
- [BotSharp](https://github.com/SciSharp/BotSharp): an open source machine learning framework for AI Bot platform builder.
6767
- [Langchain](https://github.com/tryAGI/LangChain): a framework for developing applications powered by language models.
68-
68+
- [MaIN.NET](https://github.com/wisedev-code/MaIN.NET): simplistic approach to orchestrating agents/chats from different (llm) providers
6969

7070
The following examples show how to build APPs with LLamaSharp.
7171

@@ -120,8 +120,9 @@ Generally, we recommend downloading models with quantization rather than fp16, b
120120
Here is a simple example to chat with a bot based on a LLM in LLamaSharp. Please replace the model path with yours.
121121

122122
```cs
123-
using LLama.Common;
124123
using LLama;
124+
using LLama.Common;
125+
using LLama.Sampling;
125126

126127
string modelPath = @"<Your Model Path>"; // change it to your own model path.
127128

0 commit comments

Comments
 (0)