class_docstr: A component for embedding strings using Sentence Transformers models.
  
  Usage example:
  ```python
  from haystack.components.embedders import SentenceTransformersTextEmbedder
  
  text_to_embed = "I love pizza!"
  
  text_embedder = SentenceTransformersTextEmbedder()
  text_embedder.warm_up()
  
  print(text_embedder.run(text_to_embed))
  
  # {'embedding': [-0.07804739475250244, 0.1498992145061493,, ...]}
  ```
docstr: Embed a string.
code: def run(self, text: str):
      """Embed a string."""
      if not isinstance(text, str):
          raise TypeError(
              "SentenceTransformersTextEmbedder expects a string as input."
              "In case you want to embed a list of Documents, please use the SentenceTransformersDocumentEmbedder."
          )
      if not hasattr(self, "embedding_backend"):
          raise RuntimeError(
              "The embedding model has not been loaded. Please call warm_up() before running."
          )
  
      text_to_embed = self.prefix + text + self.suffix
      embedding = self.embedding_backend.embed(
          [text_to_embed],
          batch_size=self.batch_size,
          show_progress_bar=self.progress_bar,
          normalize_embeddings=self.normalize_embeddings,
      )[0]
      return {"embedding": embedding}
  
file_path: haystack/haystack/components/embedders/sentence_transformers_text_embedder.py
imports: from typing import List, Optional, Union, Dict, Any
  from haystack import component, default_to_dict
  from haystack.components.embedders.backends.sentence_transformers_backend import _SentenceTransformersEmbeddingBackendFactory
label_desc: Use image node_id 5 for calling the SentenceTransformersTextEmbedder obj's underlying member method code with example usage: obj.run(text) and returns: dict