Skip to content

Commit 978cd80

Browse files
committed
Update Bedrock documentation for Titan V2 encoding_format support
- Add encoding_format parameter to supported parameters table - Document float and base64 encoding format options - Add usage examples for both encoding formats - Update parameter documentation for amazon.titan-embed-text-v2:0
1 parent b100328 commit 978cd80

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/my-website/docs/providers/bedrock.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,11 +1842,29 @@ response = embedding(
18421842
print(response)
18431843
```
18441844

1845+
#### Titan V2 - encoding_format support
1846+
```python
1847+
from litellm import embedding
1848+
# Float format (default)
1849+
response = embedding(
1850+
model="bedrock/amazon.titan-embed-text-v2:0",
1851+
input=["good morning from litellm"],
1852+
encoding_format="float" # Returns float array
1853+
)
1854+
1855+
# Binary format
1856+
response = embedding(
1857+
model="bedrock/amazon.titan-embed-text-v2:0",
1858+
input=["good morning from litellm"],
1859+
encoding_format="base64" # Returns base64 encoded binary
1860+
)
1861+
```
1862+
18451863
## Supported AWS Bedrock Embedding Models
18461864

18471865
| Model Name | Usage | Supported Additional OpenAI params |
18481866
|----------------------|---------------------------------------------|-----|
1849-
| Titan Embeddings V2 | `embedding(model="bedrock/amazon.titan-embed-text-v2:0", input=input)` | [here](https://github.com/BerriAI/litellm/blob/f5905e100068e7a4d61441d7453d7cf5609c2121/litellm/llms/bedrock/embed/amazon_titan_v2_transformation.py#L59) |
1867+
| Titan Embeddings V2 | `embedding(model="bedrock/amazon.titan-embed-text-v2:0", input=input)` | `dimensions`, `encoding_format` |
18501868
| Titan Embeddings - V1 | `embedding(model="bedrock/amazon.titan-embed-text-v1", input=input)` | [here](https://github.com/BerriAI/litellm/blob/f5905e100068e7a4d61441d7453d7cf5609c2121/litellm/llms/bedrock/embed/amazon_titan_g1_transformation.py#L53)
18511869
| Titan Multimodal Embeddings | `embedding(model="bedrock/amazon.titan-embed-image-v1", input=input)` | [here](https://github.com/BerriAI/litellm/blob/f5905e100068e7a4d61441d7453d7cf5609c2121/litellm/llms/bedrock/embed/amazon_titan_multimodal_transformation.py#L28) |
18521870
| Cohere Embeddings - English | `embedding(model="bedrock/cohere.embed-english-v3", input=input)` | [here](https://github.com/BerriAI/litellm/blob/f5905e100068e7a4d61441d7453d7cf5609c2121/litellm/llms/bedrock/embed/cohere_transformation.py#L18)

0 commit comments

Comments
 (0)