Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

chore(blocks/fal): Use dict instead of Dict (#8855)

Aarushide1cd6c29562
diff --git a/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/limiter.py b/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/limiter.py
index efad05836f..7ac122429c 100644
--- a/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/limiter.py
+++ b/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/limiter.py
@@ -16,7 +16,7 @@ class RateLimiter:
):
self.redis = Redis(
host=redis_host,
- port=redis_port,
+ port=int(redis_port),
password=redis_password,
decode_responses=True,
)
diff --git a/autogpt_platform/backend/backend/blocks/fal/ai_video_generator.py b/autogpt_platform/backend/backend/blocks/fal/ai_video_generator.py
index dbe8d7220a..e52e2ba5b2 100644
--- a/autogpt_platform/backend/backend/blocks/fal/ai_video_generator.py
+++ b/autogpt_platform/backend/backend/blocks/fal/ai_video_generator.py
@@ -1,7 +1,7 @@
import logging
import time
from enum import Enum
-from typing import Any, Dict
+from typing import Any
import httpx
@@ -64,7 +64,7 @@ class AIVideoGeneratorBlock(Block):
},
)
- def _get_headers(self, api_key: str) -> Dict[str, str]:
+ def _get_headers(self, api_key: str) -> dict[str, str]:
"""Get headers for FAL API requests."""
return {
"Authorization": f"Key {api_key}",
@@ -72,8 +72,8 @@ class AIVideoGeneratorBlock(Block):
}
def _submit_request(
- self, url: str, headers: Dict[str, str], data: Dict[str, Any]
- ) -> Dict[str, Any]:
+ self, url: str, headers: dict[str, str], data: dict[str, Any]
+ ) -> dict[str, Any]:
"""Submit a request to the FAL API."""
try:
response = httpx.post(url, headers=headers, json=data)
@@ -83,7 +83,7 @@ class AIVideoGeneratorBlock(Block):
logger.error(f"FAL API request failed: {str(e)}")
raise RuntimeError(f"Failed to submit request: {str(e)}")
- def _poll_status(self, status_url: str, headers: Dict[str, str]) -> Dict[str, Any]:
+ def _poll_status(self, status_url: str, headers: dict[str, str]) -> dict[str, Any]:
"""Poll the status endpoint until completion or failure."""
try:
response = httpx.get(status_url, headers=headers)