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.

fix(rnd): Fix unparsed string on HTTP block (#7795)

Zamil Majdy58dc8296db5e
diff --git a/rnd/autogpt_server/autogpt_server/blocks/http.py b/rnd/autogpt_server/autogpt_server/blocks/http.py
index b1b0e4157b..4cdb5c3e35 100644
--- a/rnd/autogpt_server/autogpt_server/blocks/http.py
+++ b/rnd/autogpt_server/autogpt_server/blocks/http.py
@@ -1,3 +1,4 @@
+import json
from enum import Enum
import requests
@@ -37,6 +38,9 @@ class HttpRequestBlock(Block):
)
def run(self, input_data: Input) -> BlockOutput:
+ if isinstance(input_data.body, str):
+ input_data.body = json.loads(input_data.body)
+
response = requests.request(
input_data.method.value,
input_data.url,