Function dimension

Source
pub fn dimension(name: Option<&str>) -> Result<u64, LlamaCoreError>
Expand description

Get the dimension of the embedding model.

§Arguments

  • name - The name of the embedding model. If None, the dimension of the first model will be returned.

§Returns

The dimension of the embedding model.

§Errors

  • The model does not exist in the embedding graphs.
  • No embedding model is available.