my-aws-helpers 4.7.0__tar.gz → 4.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of my-aws-helpers might be problematic. Click here for more details.
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/PKG-INFO +1 -1
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/bedrock.py +9 -3
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/s3.py +1 -1
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers.egg-info/PKG-INFO +1 -1
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/setup.py +1 -1
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/MANIFEST.in +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/README.md +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/api.py +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/auth.py +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/cognito.py +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/dynamo.py +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/errors.py +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/event.py +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/logging.py +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/prompts/__init__.py +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/prompts/markdown_system_prompt.txt +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/prompts/transactions_headers_prompt.txt +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/prompts/transactions_headers_prompt_v2.txt +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/prompts/transactions_prompt.txt +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/sfn.py +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers.egg-info/SOURCES.txt +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers.egg-info/dependency_links.txt +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers.egg-info/requires.txt +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers.egg-info/top_level.txt +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers.egg-info/zip-safe +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/setup.cfg +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/tests/test_cognito.py +0 -0
- {my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/tests/test_event.py +0 -0
|
@@ -11,7 +11,13 @@ from enum import Enum
|
|
|
11
11
|
import pymupdf
|
|
12
12
|
import concurrent.futures
|
|
13
13
|
from dataclasses import dataclass
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ImageType(str, Enum):
|
|
17
|
+
gif = "gif"
|
|
18
|
+
jpeg = "jpeg"
|
|
19
|
+
png = "png"
|
|
20
|
+
webp = "webp"
|
|
15
21
|
|
|
16
22
|
|
|
17
23
|
class PromptType(str, Enum):
|
|
@@ -240,7 +246,7 @@ class Bedrock:
|
|
|
240
246
|
self.logger.exception(e)
|
|
241
247
|
return []
|
|
242
248
|
|
|
243
|
-
def _get_image_block(self, image: bytes, image_content_type:
|
|
249
|
+
def _get_image_block(self, image: bytes, image_content_type: ImageType) -> dict:
|
|
244
250
|
return {
|
|
245
251
|
"image": {
|
|
246
252
|
"format": image_content_type,
|
|
@@ -251,7 +257,7 @@ class Bedrock:
|
|
|
251
257
|
}
|
|
252
258
|
|
|
253
259
|
def image_analysis(
|
|
254
|
-
self, images: List[bytes], prompt: str, image_content_type:
|
|
260
|
+
self, images: List[bytes], prompt: str, image_content_type: ImageType
|
|
255
261
|
) -> OCRResult:
|
|
256
262
|
|
|
257
263
|
system_prompt = [{"text": prompt}]
|
|
@@ -97,7 +97,7 @@ class S3:
|
|
|
97
97
|
|
|
98
98
|
def list_objects_by_prefix(self, bucket_name: str, prefix: str) -> List[Dict]:
|
|
99
99
|
try:
|
|
100
|
-
response = self.client.
|
|
100
|
+
response = self.client.list_objects_v2(
|
|
101
101
|
Bucket=bucket_name, Prefix=prefix
|
|
102
102
|
)
|
|
103
103
|
return response["Contents"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/prompts/markdown_system_prompt.txt
RENAMED
|
File without changes
|
{my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/prompts/transactions_headers_prompt.txt
RENAMED
|
File without changes
|
|
File without changes
|
{my_aws_helpers-4.7.0 → my_aws_helpers-4.8.0}/my_aws_helpers/prompts/transactions_prompt.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|