CrewAI | Memory | AWS bedrock embedding issue

Session created for AWS Bedrock

session = boto3.Session(
aws_access_key_id=os.getenv(“AWS_ACCESS_KEY_ID”),
aws_secret_access_key=os.getenv(“AWS_SECRET_ACCESS_KEY”),
region_name=“us-east-1”
)

Below is my defined crew
@crew
def crew(self) → Crew:
“”“Creates the Research Crew”“”
return Crew(
agents=self.agents,
tasks=self.tasks,
process=Process.sequential,
verbose=True,
memory=True,
user_memory=None,
knowledge_sources=[
content_source
],
embedder=dict(
provider=“bedrock”, # or openai, ollama, …
config=dict(
model=“amazon.titan-embed-text-v2:0”,
session=session
),
)
)

After running this crew I am getting below error for short_term and entities search.

ERROR:root:Error during short_term search: ClientError.init() missing 1 required positional argument: ‘operation_name’
ERROR:root:Error during entities search: ClientError.init() missing 1 required positional argument: ‘operation_name’

C:\MyData\AI-ML-Latest\AI-ML\gnoc_automation_flow.venv\Lib\site-packages\botocore\auth.py:424: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
datetime_now = datetime.datetime.utcnow()
ERROR:root:Error during short_term save: ClientError.init() missing 1 required positional argument: ‘operation_name’
C:\MyData\AI-ML-Latest\AI-ML\gnoc_automation_flow.venv\Lib\site-packages\botocore\auth.py:424: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
datetime_now = datetime.datetime.utcnow()
ERROR:root:Error during entities save: ClientError.init() missing 1 required positional argument: ‘operation_name’

Could someone please help to resolve the above issue.

1 Like