diff --git a/src/Providers/LLamaSharp/src/LLamaSharpEmbeddings.cs b/src/Providers/LLamaSharp/src/LLamaSharpEmbeddings.cs index 1a1e65fa..0cfc13f8 100644 --- a/src/Providers/LLamaSharp/src/LLamaSharpEmbeddings.cs +++ b/src/Providers/LLamaSharp/src/LLamaSharpEmbeddings.cs @@ -1,5 +1,5 @@ -using LLama.Common; -using LLama; +using LLama; +using LLama.Common; namespace LangChain.Providers.LLamaSharp; @@ -23,7 +23,8 @@ public static LLamaSharpEmbeddings FromPath(string path, float temperature = 0) return new LLamaSharpEmbeddings(new LLamaSharpConfiguration { PathToModelFile = path, - Temperature = temperature + Temperature = temperature, + EmbeddingMode = true }); } @@ -43,6 +44,7 @@ public LLamaSharpEmbeddings(LLamaSharpConfiguration configuration) : base(id: "L { ContextSize = (uint)configuration.ContextSize, Seed = (uint)configuration.Seed, + Embeddings = configuration.EmbeddingMode }; _model = LLamaWeights.LoadFromFile(parameters); _configuration = configuration;