Add Titan Embeddings G2 (#94)
This commit is contained in:
@@ -69,7 +69,7 @@ SUPPORTED_BEDROCK_EMBEDDING_MODELS = {
|
|||||||
"cohere.embed-multilingual-v3": "Cohere Embed Multilingual",
|
"cohere.embed-multilingual-v3": "Cohere Embed Multilingual",
|
||||||
"cohere.embed-english-v3": "Cohere Embed English",
|
"cohere.embed-english-v3": "Cohere Embed English",
|
||||||
# Disable Titan embedding.
|
# Disable Titan embedding.
|
||||||
# "amazon.titan-embed-text-v1": "Titan Embeddings G1 - Text",
|
"amazon.titan-embed-text-v2:0": "Titan Embeddings G2 - Text",
|
||||||
# "amazon.titan-embed-image-v1": "Titan Multimodal Embeddings G1"
|
# "amazon.titan-embed-image-v1": "Titan Multimodal Embeddings G1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -860,6 +860,8 @@ def get_embeddings_model(model_id: str) -> BedrockEmbeddingsModel:
|
|||||||
match model_name:
|
match model_name:
|
||||||
case "Cohere Embed Multilingual" | "Cohere Embed English":
|
case "Cohere Embed Multilingual" | "Cohere Embed English":
|
||||||
return CohereEmbeddingsModel()
|
return CohereEmbeddingsModel()
|
||||||
|
case "Titan Embeddings G2 - Text":
|
||||||
|
return TitanEmbeddingsModel()
|
||||||
case _:
|
case _:
|
||||||
logger.error("Unsupported model id " + model_id)
|
logger.error("Unsupported model id " + model_id)
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
|||||||
Reference in New Issue
Block a user