Skip to content

Commit d4f5637

Browse files
Python Packages update (#166)
* Updated the code according to the new Swarm agent python sdk * fix langchain package error * fix package issue
1 parent 08573f6 commit d4f5637

File tree

4 files changed

+25
-26
lines changed

4 files changed

+25
-26
lines changed

02-samples/10-multi-modal-email-assistant-agent/Multi-modal-data-ingest/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ opensearch-py
1010
botocore
1111
awscli
1212
retrying
13-
ragas>=0.1.9,<0.2.0
13+
ragas>=0.1.22
14+
langchain-community>=0.3.27
1415
ipywidgets
1516
iprogress
1617
s3fs

02-samples/10-multi-modal-email-assistant-agent/Multi-modal-data-ingest/utils/knowledge_base_operators.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ def bucket_exists(bucket_name):
319319
s3_client.head_bucket(Bucket=bucket_name)
320320
return True
321321
except ClientError as e:
322-
if e.response["Error"]["Code"] == "404":
322+
error_code = e.response["Error"]["Code"]
323+
if error_code in ["404", "403"]:
324+
# 404: Bucket doesn't exist
325+
# 403: Bucket exists but we don't have permission (owned by another account)
323326
return False
324327
else:
325328
raise e # Raise other unexpected errors

02-samples/10-multi-modal-email-assistant-agent/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ The assistant creates professional emails with:
5353
1. Run the notebooks in [Multi-modal-data-ingest/audio-video-rag/](./Multi-modal-data-ingest/audio-video-rag/) folder to process audio files
5454
2. Create a Bedrock Knowledge Base and note the KB ID
5555

56-
### Step 2: Run the Email Assistant
56+
### Step 2: Install Dependencies
57+
58+
```bash
59+
pip install -r requirements.txt
60+
```
61+
62+
### Step 3: Run the Email Assistant
5763

5864
```bash
5965
python email_assistant.py --kb-id YOUR_KB_ID --region replace_your_region
Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
1-
textblob
2-
aws-requests-auth
3-
boto3==1.37.18
4-
requests
5-
pillow
6-
yfinance
7-
pandas
8-
frozendict
9-
frozendict
1+
# Core packages for email assistant
102
strands-agents>=0.1.0
113
strands-agents-tools>=0.1.0
12-
opensearch-py
13-
botocore
14-
awscli
15-
retrying
16-
ragas>=0.1.9,<0.2.0
17-
ipywidgets
18-
iprogress
19-
s3fs
20-
pypdf
21-
tqdm
22-
pandas
23-
haystack-ai
24-
events
25-
pydub
4+
boto3>=1.37.18
5+
ipython
6+
7+
# Optional packages for notebooks and data processing
8+
# Uncomment if needed for knowledge base ingestion:
9+
# pandas
10+
# s3fs
11+
# pypdf
12+
# tqdm
13+
# pillow
14+
# pydub
2615

0 commit comments

Comments
 (0)