Find answers from the community

Updated 3 months ago

Amazon.titan-embed-text-v1 model identifier is invalid error

Hello,
I am trying to create embeddings using amazon.titan-embed-text-v1, I have access to it I have checked it through code as well.
However creating embeddings is not happening I have exceutive permission also.

This is the error I am facing please help.
ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: The provided model identifier is invalid.
W
C
7 comments
Hi can you share the code please
from llama_index.core import BedrockEmbedding

model= BedrockEmbedding(model='cohere.embed-english-v3')
embed = model.get_text_embedding('this is text')

The error is on last line leading to InvokeModel error
It should be model_name
Plain Text
model=BedrockEmbedding(model_name='cohere..')
Example for this embedding class has been updated yesterday only
Good catch, I am unable to do same for Titan models on the above code like amazon.titan-embed-text-v1
I hope with model_name now it is working for you
Yes it is working now thank you for your help.
Add a reply
Sign up and join the conversation on Discord