mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-07 07:08:31 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user