mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-06 01:32:36 +00:00
Update embedding_configurator.py
Modified _configure_bedrock method to use user submitted model_name rather than default amazon.titan-embed-text-v1. Sending model_name in short_term_memory (embedder_config/config) was not working. # Passing model_name to use model_name provide by user than using default. Added if/else for backward compatibility
This commit is contained in:
@@ -142,9 +142,16 @@ class EmbeddingConfigurator:
|
||||
AmazonBedrockEmbeddingFunction,
|
||||
)
|
||||
|
||||
return AmazonBedrockEmbeddingFunction(
|
||||
session=config.get("session"),
|
||||
)
|
||||
# Passing model_name to use model_name provide by user than using default. Added if/else for backward compatibility
|
||||
if model_name==None:
|
||||
return AmazonBedrockEmbeddingFunction(
|
||||
session=config.get("session"),
|
||||
)
|
||||
else:
|
||||
return AmazonBedrockEmbeddingFunction(
|
||||
session=config.get("session"),
|
||||
model_name=model_name
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _configure_huggingface(config, model_name):
|
||||
|
||||
Reference in New Issue
Block a user