> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# embedding • Rust AI Agent SDK

> embedding: Synchronous embedding function (alias)

# embedding

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**extras**](../modules/extras) module.

Synchronous embedding function (alias)

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def embedding(text: &str, model: Option<&str>) -> crate::error::Result<Vec<f32>>
```

## Parameters

<ParamField query="text" type="&str" required={true}>
  No description available.
</ParamField>

<ParamField query="model" type="Option<&str>" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="crate::error::Result<Vec<f32>>">
  The result of the operation.
</ResponseField>

## Uses

* `embed`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/parity/extras.rs#L522">
  `praisonai/src/parity/extras.rs` at line 522
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Embeddings" icon="code" href="/docs/rust/embeddings" />

  <Card title="Rust Embedding" icon="code" href="/docs/rust/embedding" />

  <Card title="Rust Vector Store" icon="database" href="/docs/rust/vector-store" />
</CardGroup>
