🐛 fix(constants.tsx): change payload key from "message" to "inputs" to match API requirements
The payload key was changed from "message" to "inputs" to match the API requirements. This change ensures that the API can correctly parse the request payload.
This commit is contained in:
parent
b548a642ff
commit
2bad404c62
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue