fix: webhook endpoint passes webhook input as is
This commit is contained in:
parent
d1f17db404
commit
335cd40418
1 changed files with 5 additions and 5 deletions
|
|
@ -276,15 +276,15 @@ async def webhook_run_flow(
|
||||||
# get all webhook components in the flow
|
# get all webhook components in the flow
|
||||||
webhook_components = get_all_webhook_components_in_flow(flow.data)
|
webhook_components = get_all_webhook_components_in_flow(flow.data)
|
||||||
tweaks = {}
|
tweaks = {}
|
||||||
data_dict = await request.json()
|
|
||||||
for component in webhook_components:
|
for component in webhook_components:
|
||||||
tweaks[component["id"]] = {"data": data.decode() if isinstance(data, bytes) else data}
|
tweaks[component["id"]] = {"data": data.decode() if isinstance(data, bytes) else data}
|
||||||
input_request = SimplifiedAPIRequest(
|
input_request = SimplifiedAPIRequest(
|
||||||
input_value=data_dict.get("input_value", ""),
|
input_value="",
|
||||||
input_type=data_dict.get("input_type", "chat"),
|
input_type="chat",
|
||||||
output_type=data_dict.get("output_type", "chat"),
|
output_type="chat",
|
||||||
tweaks=tweaks,
|
tweaks=tweaks,
|
||||||
session_id=data_dict.get("session_id"),
|
session_id=None,
|
||||||
)
|
)
|
||||||
logger.debug("Starting background task")
|
logger.debug("Starting background task")
|
||||||
background_tasks.add_task( # type: ignore
|
background_tasks.add_task( # type: ignore
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue