mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
process all request data implicitly
This commit is contained in:
@@ -547,9 +547,7 @@ def agent_webhook_worker(self, agent_id, payload):
|
|||||||
agent_config = agents_collection.find_one({"_id": agent_oid})
|
agent_config = agents_collection.find_one({"_id": agent_oid})
|
||||||
if not agent_config:
|
if not agent_config:
|
||||||
raise ValueError(f"Agent with ID {agent_id} not found.")
|
raise ValueError(f"Agent with ID {agent_id} not found.")
|
||||||
input_data = payload.get("query", "")
|
input_data = json.dumps(payload)
|
||||||
if input_data is None or not isinstance(input_data, str):
|
|
||||||
input_data = json.dumps(payload)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"Error processing agent webhook: {e}", exc_info=True)
|
logging.error(f"Error processing agent webhook: {e}", exc_info=True)
|
||||||
return {"status": "error", "error": str(e)}
|
return {"status": "error", "error": str(e)}
|
||||||
|
|||||||
Reference in New Issue
Block a user