Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ def __init__(
output_parser: Optional[BaseOutputParser] = None,
**kwargs: Any,
):
if "model" in kwargs:
raise ValueError(
"The 'model' parameter is not supported. "
"Please use 'model_name' instead to specify the Bedrock model ID."
)

additional_kwargs = additional_kwargs or {}

session_kwargs = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dev = [

[project]
name = "llama-index-embeddings-bedrock"
version = "0.7.3"
version = "0.7.4"
description = "llama-index embeddings bedrock integration"
authors = [{name = "Your Name", email = "you@example.com"}]
requires-python = ">=3.9,<4.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ def test_class():
assert BaseEmbedding.__name__ in names_of_base_classes


def test_model_param_raises_error():
"""Test that passing 'model' instead of 'model_name' raises ValueError."""
bedrock_client = boto3.client("bedrock-runtime", region_name="us-east-1")
with pytest.raises(ValueError, match="Please use 'model_name' instead"):
BedrockEmbedding(model="cohere.embed-multilingual-v3", client=bedrock_client)


def test_get_provider_two_part_format():
"""Test _get_provider with 2-part model names (provider.model)."""
bedrock_client = boto3.client("bedrock-runtime", region_name="us-east-1")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.