Skip to content

Commit

Permalink
Merge branch 'master' into add-gmail
Browse files Browse the repository at this point in the history
  • Loading branch information
ntindle authored Oct 1, 2024
2 parents 3cd1b58 + f892894 commit 02458f1
Show file tree
Hide file tree
Showing 36 changed files with 776 additions and 705 deletions.
4 changes: 2 additions & 2 deletions autogpt_platform/backend/backend/blocks/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="b2g2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6",
id="0e50422c-6dee-4145-83d6-3a5a392f65de",
description="Lookup the given key in the input dictionary/object/list and return the value.",
input_schema=FindInDictionaryBlock.Input,
output_schema=FindInDictionaryBlock.Output,
Expand Down Expand Up @@ -429,7 +429,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="31d1064e-7446-4693-o7d4-65e5ca9110d1",
id="cc10ff7b-7753-4ff2-9af6-9399b1a7eddc",
description="This block is used to display a sticky note with the given text.",
categories={BlockCategory.BASIC},
input_schema=NoteBlock.Input,
Expand Down
4 changes: 2 additions & 2 deletions autogpt_platform/backend/backend/blocks/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="d3f4g5h6-1i2j-3k4l-5m6n-7o8p9q0r1s2t", # Unique ID for the node
id="df06086a-d5ac-4abb-9996-2ad0acb2eff7",
input_schema=ReadDiscordMessagesBlock.Input, # Assign input schema
output_schema=ReadDiscordMessagesBlock.Output, # Assign output schema
description="Reads messages from a Discord channel using a bot token.",
Expand Down Expand Up @@ -146,7 +146,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="h1i2j3k4-5l6m-7n8o-9p0q-r1s2t3u4v5w6", # Unique ID for the node
id="d0822ab5-9f8a-44a3-8971-531dd0178b6b",
input_schema=SendDiscordMessageBlock.Input, # Assign input schema
output_schema=SendDiscordMessageBlock.Output, # Assign output schema
description="Sends a message to a Discord channel using a bot token.",
Expand Down
2 changes: 1 addition & 1 deletion autogpt_platform/backend/backend/blocks/email_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="a1234567-89ab-cdef-0123-456789abcdef",
id="4335878a-394e-4e67-adf2-919877ff49ae",
description="This block sends an email using the provided SMTP credentials.",
categories={BlockCategory.OUTPUT},
input_schema=SendEmailBlock.Input,
Expand Down
2 changes: 1 addition & 1 deletion autogpt_platform/backend/backend/blocks/iteration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="f8e7d6c5-b4a3-2c1d-0e9f-8g7h6i5j4k3l",
id="f66a3543-28d3-4ab5-8945-9b336371e2ce",
input_schema=StepThroughItemsBlock.Input,
output_schema=StepThroughItemsBlock.Output,
categories={BlockCategory.LOGIC},
Expand Down
4 changes: 2 additions & 2 deletions autogpt_platform/backend/backend/blocks/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="c3d4e5f6-7g8h-9i0j-1k2l-m3n4o5p6q7r8",
id="a0a69be1-4528-491c-a85a-a4ab6873e3f0",
description="Utilize a Large Language Model (LLM) to summarize a long text.",
categories={BlockCategory.AI, BlockCategory.TEXT},
input_schema=AITextSummarizerBlock.Input,
Expand Down Expand Up @@ -535,7 +535,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="c3d4e5f6-g7h8-i9j0-k1l2-m3n4o5p6q7r8",
id="32a87eab-381e-4dd4-bdb8-4c47151be35a",
description="Advanced LLM call that takes a list of messages and sends them to the language model.",
categories={BlockCategory.AI},
input_schema=AIConversationBlock.Input,
Expand Down
2 changes: 1 addition & 1 deletion autogpt_platform/backend/backend/blocks/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="c6731acb-4105-4zp1-bc9b-03d0036h370g",
id="5ebe6768-8e5d-41e3-9134-1c7bd89a8d52",
input_schema=ReadRSSFeedBlock.Input,
output_schema=ReadRSSFeedBlock.Output,
description="Reads RSS feed entries from a given URL.",
Expand Down
6 changes: 3 additions & 3 deletions autogpt_platform/backend/backend/blocks/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="h5e7f8g9-1b2c-3d4e-5f6g-7h8i9j0k1l2m",
id="f5b0f5d0-1862-4d61-94be-3ad0fa772760",
description="This block fetches the summary of a given topic from Wikipedia.",
categories={BlockCategory.SEARCH},
input_schema=GetWikipediaSummaryBlock.Input,
Expand Down Expand Up @@ -62,7 +62,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7",
id="87840993-2053-44b7-8da4-187ad4ee518c",
description="This block searches the internet for the given search query.",
categories={BlockCategory.SEARCH},
input_schema=SearchTheWebBlock.Input,
Expand Down Expand Up @@ -109,7 +109,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6", # Unique ID for the block
id="436c3984-57fd-4b85-8e9a-459b356883bd",
description="This block scrapes the content from the given web URL.",
categories={BlockCategory.SEARCH},
input_schema=ExtractWebsiteContentBlock.Input,
Expand Down
2 changes: 1 addition & 1 deletion autogpt_platform/backend/backend/blocks/time_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Output(BlockSchema):

def __init__(self):
super().__init__(
id="b29c1b50-5d0e-4d9f-8f9d-1b0e6fcbf0h2",
id="716a67b3-6760-42e7-86dc-18645c6e00fc",
description="This block outputs the current date and time.",
categories={BlockCategory.TEXT},
input_schema=GetCurrentDateAndTimeBlock.Input,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"nodes": [
{
"id": "b8138bca-7892-42c2-9594-a845d3483413",
"block_id": "d3f4g5h6-1i2j-3k4l-5m6n-7o8p9q0r1s2t",
"block_id": "df06086a-d5ac-4abb-9996-2ad0acb2eff7",
"input_default": {},
"metadata": {
"position": {
Expand Down Expand Up @@ -59,7 +59,7 @@
},
{
"id": "dda2d061-2ef9-4dc5-9433-918c8395a4ac",
"block_id": "h1i2j3k4-5l6m-7n8o-9p0q-r1s2t3u4v5w6",
"block_id": "d0822ab5-9f8a-44a3-8971-531dd0178b6b",
"input_default": {},
"metadata": {
"position": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
},
{
"id": "b45cfa51-5ead-4621-9f1c-f847dfea3e4c",
"block_id": "d3f4g5h6-1i2j-3k4l-5m6n-7o8p9q0r1s2t",
"block_id": "df06086a-d5ac-4abb-9996-2ad0acb2eff7",
"input_default": {},
"metadata": {
"position": {
Expand Down Expand Up @@ -146,7 +146,7 @@
},
{
"id": "8eedcf71-1146-4f54-b522-bf9b6e2d26b2",
"block_id": "h1i2j3k4-5l6m-7n8o-9p0q-r1s2t3u4v5w6",
"block_id": "d0822ab5-9f8a-44a3-8971-531dd0178b6b",
"input_default": {},
"metadata": {
"position": {
Expand Down Expand Up @@ -197,7 +197,7 @@
},
{
"id": "a568daee-45d2-4429-bf33-cbe9e1261f7b",
"block_id": "c3d4e5f6-g7h8-i9j0-k1l2-m3n4o5p6q7r8",
"block_id": "32a87eab-381e-4dd4-bdb8-4c47151be35a",
"input_default": {
"model": "llama-3.1-70b-versatile",
"max_tokens": 2000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"nodes": [
{
"id": "60ba4aac-1751-4be7-8745-1bd32191d4a2",
"block_id": "d3f4g5h6-1i2j-3k4l-5m6n-7o8p9q0r1s2t",
"block_id": "df06086a-d5ac-4abb-9996-2ad0acb2eff7",
"input_default": {},
"metadata": {
"position": {
Expand Down Expand Up @@ -45,7 +45,7 @@
},
{
"id": "5658c4f7-8e67-4d30-93f2-157bdbd3ef87",
"block_id": "b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7",
"block_id": "87840993-2053-44b7-8da4-187ad4ee518c",
"input_default": {},
"metadata": {
"position": {
Expand Down Expand Up @@ -118,7 +118,7 @@
},
{
"id": "f3d62f22-d193-4f04-85d2-164200fca4c0",
"block_id": "h1i2j3k4-5l6m-7n8o-9p0q-r1s2t3u4v5w6",
"block_id": "d0822ab5-9f8a-44a3-8971-531dd0178b6b",
"input_default": {},
"metadata": {
"position": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"nodes": [
{
"id": "382efac9-3def-4baf-b16a-d6d2512a5c8b",
"block_id": "b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7",
"block_id": "87840993-2053-44b7-8da4-187ad4ee518c",
"input_default": {
"query": "19th July 2024 Microsoft Blackout"
},
Expand Down Expand Up @@ -44,7 +44,7 @@
},
{
"id": "0cd8f670-8956-4942-ba28-aee732ec783f",
"block_id": "b2g2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6",
"block_id": "0e50422c-6dee-4145-83d6-3a5a392f65de",
"input_default": {
"key": "TITLE"
},
Expand All @@ -57,7 +57,7 @@
},
{
"id": "4a15b6b9-036d-43d3-915a-7e931fbc6522",
"block_id": "b2g2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6",
"block_id": "0e50422c-6dee-4145-83d6-3a5a392f65de",
"input_default": {
"key": "CONTENT"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- Update AgentBlock IDs: this should cascade to the AgentNode and UserBlockCredit tables
UPDATE "AgentBlock"
SET "id" = CASE
WHEN "id" = 'a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6' THEN '436c3984-57fd-4b85-8e9a-459b356883bd'
WHEN "id" = 'b2g2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6' THEN '0e50422c-6dee-4145-83d6-3a5a392f65de'
WHEN "id" = 'c3d4e5f6-7g8h-9i0j-1k2l-m3n4o5p6q7r8' THEN 'a0a69be1-4528-491c-a85a-a4ab6873e3f0'
WHEN "id" = 'c3d4e5f6-g7h8-i9j0-k1l2-m3n4o5p6q7r8' THEN '32a87eab-381e-4dd4-bdb8-4c47151be35a'
WHEN "id" = 'b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7' THEN '87840993-2053-44b7-8da4-187ad4ee518c'
WHEN "id" = 'h1i2j3k4-5l6m-7n8o-9p0q-r1s2t3u4v5w6' THEN 'd0822ab5-9f8a-44a3-8971-531dd0178b6b'
WHEN "id" = 'd3f4g5h6-1i2j-3k4l-5m6n-7o8p9q0r1s2t' THEN 'df06086a-d5ac-4abb-9996-2ad0acb2eff7'
WHEN "id" = 'h5e7f8g9-1b2c-3d4e-5f6g-7h8i9j0k1l2m' THEN 'f5b0f5d0-1862-4d61-94be-3ad0fa772760'
WHEN "id" = 'a1234567-89ab-cdef-0123-456789abcdef' THEN '4335878a-394e-4e67-adf2-919877ff49ae'
WHEN "id" = 'f8e7d6c5-b4a3-2c1d-0e9f-8g7h6i5j4k3l' THEN 'f66a3543-28d3-4ab5-8945-9b336371e2ce'
WHEN "id" = 'b29c1b50-5d0e-4d9f-8f9d-1b0e6fcbf0h2' THEN '716a67b3-6760-42e7-86dc-18645c6e00fc'
WHEN "id" = '31d1064e-7446-4693-o7d4-65e5ca9110d1' THEN 'cc10ff7b-7753-4ff2-9af6-9399b1a7eddc'
WHEN "id" = 'c6731acb-4105-4zp1-bc9b-03d0036h370g' THEN '5ebe6768-8e5d-41e3-9134-1c7bd89a8d52'
ELSE "id"
END;
1 change: 1 addition & 0 deletions autogpt_platform/docker-compose.platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ services:
# - NEXT_PUBLIC_AGPT_SERVER_URL=http://localhost:8006/api
# - NEXT_PUBLIC_AGPT_WS_SERVER_URL=ws://localhost:8001/ws
# - NEXT_PUBLIC_AGPT_MARKETPLACE_URL=http://localhost:8015/api/v1/market
# - NEXT_PUBLIC_BEHAVE_AS=LOCAL
# ports:
# - "3000:3000"
# networks:
Expand Down
3 changes: 3 additions & 0 deletions autogpt_platform/frontend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAic
## Only used if you're using Supabase and OAuth
AUTH_CALLBACK_URL=http://localhost:3000/auth/callback
GA_MEASUREMENT_ID=G-FH2XK2W4GN

# When running locally, set NEXT_PUBLIC_BEHAVE_AS=CLOUD to use the a locally hosted marketplace (as is typical in development, and the cloud deployment), otherwise set it to LOCAL to have the marketplace open in a new tab
NEXT_PUBLIC_BEHAVE_AS=LOCAL
2 changes: 1 addition & 1 deletion autogpt_platform/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
},
"devDependencies": {
"@playwright/test": "^1.47.1",
"@types/node": "^20",
"@types/node": "^22.7.3",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react-modal": "^3.16.3",
Expand Down
5 changes: 3 additions & 2 deletions autogpt_platform/frontend/src/components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import Image from "next/image";
import getServerUser from "@/hooks/getServerUser";
import ProfileDropdown from "./ProfileDropdown";
import { IconCircleUser, IconMenu } from "@/components/ui/icons";
import CreditButton from "@/components/CreditButton";
import { NavBarButtons } from "./NavBarButtons";
import CreditButton from "@/components/nav/CreditButton";

import { NavBarButtons } from "./nav/NavBarButtons";

export async function NavBar() {
const isAvailable = Boolean(
Expand Down
47 changes: 0 additions & 47 deletions autogpt_platform/frontend/src/components/NavBarButtons.tsx

This file was deleted.

39 changes: 39 additions & 0 deletions autogpt_platform/frontend/src/components/agent-import-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,44 @@ const formSchema = z.object({
importAsTemplate: z.boolean(),
});

function updateBlockIDs(graph: Graph) {
// https://github.com/Significant-Gravitas/AutoGPT/issues/8223
const updatedBlockIDMap: Record<string, string> = {
"a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6":
"436c3984-57fd-4b85-8e9a-459b356883bd",
"b2g2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6":
"0e50422c-6dee-4145-83d6-3a5a392f65de",
"c3d4e5f6-7g8h-9i0j-1k2l-m3n4o5p6q7r8":
"a0a69be1-4528-491c-a85a-a4ab6873e3f0",
"c3d4e5f6-g7h8-i9j0-k1l2-m3n4o5p6q7r8":
"32a87eab-381e-4dd4-bdb8-4c47151be35a",
"b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7":
"87840993-2053-44b7-8da4-187ad4ee518c",
"h1i2j3k4-5l6m-7n8o-9p0q-r1s2t3u4v5w6":
"d0822ab5-9f8a-44a3-8971-531dd0178b6b",
"d3f4g5h6-1i2j-3k4l-5m6n-7o8p9q0r1s2t":
"df06086a-d5ac-4abb-9996-2ad0acb2eff7",
"h5e7f8g9-1b2c-3d4e-5f6g-7h8i9j0k1l2m":
"f5b0f5d0-1862-4d61-94be-3ad0fa772760",
"a1234567-89ab-cdef-0123-456789abcdef":
"4335878a-394e-4e67-adf2-919877ff49ae",
"f8e7d6c5-b4a3-2c1d-0e9f-8g7h6i5j4k3l":
"f66a3543-28d3-4ab5-8945-9b336371e2ce",
"b29c1b50-5d0e-4d9f-8f9d-1b0e6fcbf0h2":
"716a67b3-6760-42e7-86dc-18645c6e00fc",
"31d1064e-7446-4693-o7d4-65e5ca9110d1":
"cc10ff7b-7753-4ff2-9af6-9399b1a7eddc",
"c6731acb-4105-4zp1-bc9b-03d0036h370g":
"5ebe6768-8e5d-41e3-9134-1c7bd89a8d52",
};
graph.nodes
.filter((node) => node.block_id in updatedBlockIDMap)
.forEach((node) => {
node.block_id = updatedBlockIDMap[node.block_id];
});
return graph;
}

export const AgentImportForm: React.FC<
React.FormHTMLAttributes<HTMLFormElement>
> = ({ className, ...props }) => {
Expand Down Expand Up @@ -116,6 +154,7 @@ export const AgentImportForm: React.FC<
);
}
const agent = obj as Graph;
updateBlockIDs(agent);
setAgentObject(agent);
form.setValue("agentName", agent.name);
form.setValue("agentDescription", agent.description);
Expand Down
Loading

0 comments on commit 02458f1

Please sign in to comment.