From 2bad404c627a3185e6f60a1f765abe06bc973366 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 22 Jun 2023 19:22:04 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(constants.tsx):=20change=20p?= =?UTF-8?q?ayload=20key=20from=20"message"=20to=20"inputs"=20to=20match=20?= =?UTF-8?q?API=20requirements=20The=20payload=20key=20was=20changed=20from?= =?UTF-8?q?=20"message"=20to=20"inputs"=20to=20match=20the=20API=20require?= =?UTF-8?q?ments.=20This=20change=20ensures=20that=20the=20API=20can=20cor?= =?UTF-8?q?rectly=20parse=20the=20request=20payload.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/constants.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/constants.tsx b/src/frontend/src/constants.tsx index 1cfaa1c46..f569046ea 100644 --- a/src/frontend/src/constants.tsx +++ b/src/frontend/src/constants.tsx @@ -83,7 +83,7 @@ def run_flow(message: str, flow_id: str, tweaks: dict = None) -> dict: """ api_url = f"{BASE_API_URL}/{flow_id}" - payload = {"message": message} + payload = {"inputs": {"input": message}} if tweaks: payload["tweaks"] = tweaks @@ -108,7 +108,7 @@ export const getCurlCode = (flow: FlowType): string => { window.location.host }/api/v1/process/${flowId} \\ -H 'Content-Type: application/json' \\ - -d '{"message": "Your message", "tweaks": ${JSON.stringify( + -d '{"inputs": {"input": message}, "tweaks": ${JSON.stringify( tweaks, null, 2