Skip to content

Commit 9c6cc5b

Browse files
committed
Merge branch 'dev'
2 parents 2bc6a56 + b34973c commit 9c6cc5b

File tree

271 files changed

+7377
-1192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+7377
-1192
lines changed

autogpt_platform/autogpt_libs/autogpt_libs/utils/cache.py

Lines changed: 245 additions & 183 deletions
Large diffs are not rendered by default.

autogpt_platform/autogpt_libs/autogpt_libs/utils/cache_test.py

Lines changed: 228 additions & 257 deletions
Large diffs are not rendered by default.

autogpt_platform/backend/.env.default

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ NVIDIA_API_KEY=
6666
GITHUB_CLIENT_ID=
6767
GITHUB_CLIENT_SECRET=
6868

69+
# Notion OAuth App server credentials - https://developers.notion.com/docs/authorization
70+
# Configure a public integration
71+
NOTION_CLIENT_ID=
72+
NOTION_CLIENT_SECRET=
73+
6974
# Google OAuth App server credentials - https://console.cloud.google.com/apis/credentials, and enable gmail api and set scopes
7075
# https://console.cloud.google.com/apis/credentials/consent ?project=<your_project_id>
7176
# You'll need to add/enable the following scopes (minimum):

autogpt_platform/backend/.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,12 @@ secrets/*
99
!secrets/.gitkeep
1010

1111
*.ignore.*
12-
*.ign.*
12+
*.ign.*
13+
14+
# Load test results and reports
15+
load-tests/*_RESULTS.md
16+
load-tests/*_REPORT.md
17+
load-tests/results/
18+
load-tests/*.json
19+
load-tests/*.log
20+
load-tests/node_modules/*

autogpt_platform/backend/Dockerfile

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ WORKDIR /app
99

1010
RUN echo 'Acquire::http::Pipeline-Depth 0;\nAcquire::http::No-Cache true;\nAcquire::BrokenProxy true;\n' > /etc/apt/apt.conf.d/99fixbadproxy
1111

12-
# Update package list and install Python and build dependencies
12+
# Install Node.js repository key and setup
1313
RUN apt-get update --allow-releaseinfo-change --fix-missing \
14+
&& apt-get install -y curl ca-certificates gnupg \
15+
&& mkdir -p /etc/apt/keyrings \
16+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
17+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
18+
19+
# Update package list and install Python, Node.js, and build dependencies
20+
RUN apt-get update \
1421
&& apt-get install -y \
1522
python3.13 \
1623
python3.13-dev \
@@ -20,7 +27,9 @@ RUN apt-get update --allow-releaseinfo-change --fix-missing \
2027
libpq5 \
2128
libz-dev \
2229
libssl-dev \
23-
postgresql-client
30+
postgresql-client \
31+
nodejs \
32+
&& rm -rf /var/lib/apt/lists/*
2433

2534
ENV POETRY_HOME=/opt/poetry
2635
ENV POETRY_NO_INTERACTION=1
@@ -54,13 +63,18 @@ ENV PATH=/opt/poetry/bin:$PATH
5463
# Install Python without upgrading system-managed packages
5564
RUN apt-get update && apt-get install -y \
5665
python3.13 \
57-
python3-pip
66+
python3-pip \
67+
&& rm -rf /var/lib/apt/lists/*
5868

5969
# Copy only necessary files from builder
6070
COPY --from=builder /app /app
6171
COPY --from=builder /usr/local/lib/python3* /usr/local/lib/python3*
6272
COPY --from=builder /usr/local/bin/poetry /usr/local/bin/poetry
63-
# Copy Prisma binaries
73+
# Copy Node.js installation for Prisma
74+
COPY --from=builder /usr/bin/node /usr/bin/node
75+
COPY --from=builder /usr/lib/node_modules /usr/lib/node_modules
76+
COPY --from=builder /usr/bin/npm /usr/bin/npm
77+
COPY --from=builder /usr/bin/npx /usr/bin/npx
6478
COPY --from=builder /root/.cache/prisma-python/binaries /root/.cache/prisma-python/binaries
6579

6680
ENV PATH="/app/autogpt_platform/backend/.venv/bin:$PATH"

autogpt_platform/backend/backend/blocks/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import functools
21
import importlib
32
import logging
43
import os
54
import re
65
from pathlib import Path
76
from typing import TYPE_CHECKING, TypeVar
87

8+
from autogpt_libs.utils.cache import cached
9+
910
logger = logging.getLogger(__name__)
1011

1112

@@ -15,7 +16,7 @@
1516
T = TypeVar("T")
1617

1718

18-
@functools.cache
19+
@cached()
1920
def load_all_blocks() -> dict[str, type["Block"]]:
2021
from backend.data.block import Block
2122
from backend.util.settings import Config

autogpt_platform/backend/backend/blocks/dataforseo/_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ async def related_keywords(
113113
include_serp_info: bool = False,
114114
include_clickstream_data: bool = False,
115115
limit: int = 100,
116+
depth: Optional[int] = None,
116117
) -> List[Dict[str, Any]]:
117118
"""
118119
Get related keywords from DataForSEO Labs.
@@ -125,6 +126,7 @@ async def related_keywords(
125126
include_serp_info: Include SERP data
126127
include_clickstream_data: Include clickstream metrics
127128
limit: Maximum number of results (up to 3000)
129+
depth: Keyword search depth (0-4), controls number of returned keywords
128130
129131
Returns:
130132
API response with related keywords
@@ -148,6 +150,8 @@ async def related_keywords(
148150
task_data["include_clickstream_data"] = include_clickstream_data
149151
if limit is not None:
150152
task_data["limit"] = limit
153+
if depth is not None:
154+
task_data["depth"] = depth
151155

152156
payload = [task_data]
153157

autogpt_platform/backend/backend/blocks/dataforseo/related_keywords.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ class Input(BlockSchema):
7878
ge=1,
7979
le=3000,
8080
)
81+
depth: int = SchemaField(
82+
description="Keyword search depth (0-4). Controls the number of returned keywords: 0=1 keyword, 1=~8 keywords, 2=~72 keywords, 3=~584 keywords, 4=~4680 keywords",
83+
default=1,
84+
ge=0,
85+
le=4,
86+
)
8187

8288
class Output(BlockSchema):
8389
related_keywords: List[RelatedKeyword] = SchemaField(
@@ -154,6 +160,7 @@ async def _fetch_related_keywords(
154160
include_serp_info=input_data.include_serp_info,
155161
include_clickstream_data=input_data.include_clickstream_data,
156162
limit=input_data.limit,
163+
depth=input_data.depth,
157164
)
158165

159166
async def run(

0 commit comments

Comments
 (0)