# LLamaEmbedder Namespace: LLama The embedder for LLama, which supports getting embeddings from text. ```csharp public sealed class LLamaEmbedder : System.IDisposable ``` Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [LLamaEmbedder](./llama.llamaembedder.md)
Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable) ## Properties ### **EmbeddingSize** Dimension of embedding vectors ```csharp public int EmbeddingSize { get; } ``` #### Property Value [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
## Constructors ### **LLamaEmbedder(IModelParams)** ```csharp public LLamaEmbedder(IModelParams params) ``` #### Parameters `params` [IModelParams](./llama.abstractions.imodelparams.md)
### **LLamaEmbedder(LLamaWeights, IModelParams)** ```csharp public LLamaEmbedder(LLamaWeights weights, IModelParams params) ``` #### Parameters `weights` [LLamaWeights](./llama.llamaweights.md)
`params` [IModelParams](./llama.abstractions.imodelparams.md)
## Methods ### **GetEmbeddings(String, Int32, Boolean, String)** #### Caution 'threads' and 'encoding' parameters are no longer used --- Get the embeddings of the text. ```csharp public Single[] GetEmbeddings(string text, int threads, bool addBos, string encoding) ``` #### Parameters `text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
`threads` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
unused `addBos` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
Add bos to the text. `encoding` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
unused #### Returns [Single[]](https://docs.microsoft.com/en-us/dotnet/api/system.single)
#### Exceptions [RuntimeError](./llama.exceptions.runtimeerror.md)
### **GetEmbeddings(String)** Get the embeddings of the text. ```csharp public Single[] GetEmbeddings(string text) ``` #### Parameters `text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
#### Returns [Single[]](https://docs.microsoft.com/en-us/dotnet/api/system.single)
#### Exceptions [RuntimeError](./llama.exceptions.runtimeerror.md)
### **GetEmbeddings(String, Boolean)** Get the embeddings of the text. ```csharp public Single[] GetEmbeddings(string text, bool addBos) ``` #### Parameters `text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
`addBos` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
Add bos to the text. #### Returns [Single[]](https://docs.microsoft.com/en-us/dotnet/api/system.single)
#### Exceptions [RuntimeError](./llama.exceptions.runtimeerror.md)
### **Dispose()** ```csharp public void Dispose() ```