Skip to content

Add Titan Embeddings G2 #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion src/api/models/bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_inference_region_prefix():
"cohere.embed-multilingual-v3": "Cohere Embed Multilingual",
"cohere.embed-english-v3": "Cohere Embed English",
# 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"
}

Expand Down Expand Up @@ -852,6 +852,8 @@ def get_embeddings_model(model_id: str) -> BedrockEmbeddingsModel:
match model_name:
case "Cohere Embed Multilingual" | "Cohere Embed English":
return CohereEmbeddingsModel()
case "Titan Embeddings G2 - Text":
return TitanEmbeddingsModel()
case _:
logger.error("Unsupported model id " + model_id)
raise HTTPException(
Expand Down