| @@ -27,7 +27,7 @@ namespace LLamaSharp.KernelMemory | |||||
| public LLamaSharpTextEmbeddingGenerator(LLamaSharpConfig config) | public LLamaSharpTextEmbeddingGenerator(LLamaSharpConfig config) | ||||
| { | { | ||||
| this._config = config; | this._config = config; | ||||
| var @params = new ModelParams(_config.ModelPath); | |||||
| var @params = new ModelParams(_config.ModelPath) { EmbeddingMode = true }; | |||||
| _weights = LLamaWeights.LoadFromFile(@params); | _weights = LLamaWeights.LoadFromFile(@params); | ||||
| _embedder = new LLamaEmbedder(_weights, @params); | _embedder = new LLamaEmbedder(_weights, @params); | ||||
| _ownsWeights = true; | _ownsWeights = true; | ||||
| @@ -42,7 +42,7 @@ namespace LLamaSharp.KernelMemory | |||||
| public LLamaSharpTextEmbeddingGenerator(LLamaSharpConfig config, LLamaWeights weights) | public LLamaSharpTextEmbeddingGenerator(LLamaSharpConfig config, LLamaWeights weights) | ||||
| { | { | ||||
| this._config = config; | this._config = config; | ||||
| var @params = new ModelParams(_config.ModelPath); | |||||
| var @params = new ModelParams(_config.ModelPath) { EmbeddingMode = true }; | |||||
| _weights = weights; | _weights = weights; | ||||
| _embedder = new LLamaEmbedder(_weights, @params); | _embedder = new LLamaEmbedder(_weights, @params); | ||||
| _ownsEmbedder = true; | _ownsEmbedder = true; | ||||