fix: additional linting fixes from pre-commit hooks

- Fixed import error handling in bedrock invoke agent tool
- Fixed timeout in contextual AI rerank tool
This commit is contained in:
Greyson LaLonde
2025-09-19 00:09:44 -04:00
parent c5c07331bb
commit 080a7d753f
2 changed files with 6 additions and 2 deletions

View File

@@ -96,7 +96,9 @@ class BedrockInvokeAgentTool(BaseTool):
import boto3
from botocore.exceptions import ClientError
except ImportError as e:
raise ImportError("`boto3` package not found, please run `uv add boto3`") from e
raise ImportError(
"`boto3` package not found, please run `uv add boto3`"
) from e
try:
# Initialize the Bedrock Agent Runtime client

View File

@@ -66,7 +66,9 @@ class ContextualAIRerankTool(BaseTool):
payload["metadata"] = metadata
rerank_url = f"{base_url}/rerank"
result = requests.post(rerank_url, json=payload, headers=headers, timeout=30)
result = requests.post(
rerank_url, json=payload, headers=headers, timeout=30
)
if result.status_code != 200:
raise RuntimeError(