{
"event": "PreToolUse",
"tool_name": "Grep",
"tool_input": {
"pattern": "def generate_content",
"path": "\/var\/www\/scripts\/pipeline\/generate.py",
"output_mode": "content",
"-A": 30
}
}
{
"tool_response": {
"mode": "content",
"numFiles": 0,
"filenames": [],
"content": "570:def generate_content(order_id, model=\"anthropic\", collection=\"documents\", context_limit=5):\n571- \"\"\"\n572- Main content generation function.\n573-\n574- Args:\n575- order_id: Content order ID\n576- model: 'anthropic' or 'ollama'\n577- collection: Qdrant collection to search\n578- context_limit: Number of context chunks\n579-\n580- Returns:\n581- dict with version_id, content, sources\n582- \"\"\"\n583- db.connect()\n584-\n585- try:\n586- # Load order\n587- order = get_order(order_id)\n588- if not order:\n589- return {\"error\": f\"Order {order_id} not found\"}\n590-\n591- # Update status\n592- update_order_status(order_id, \"generating\")\n593-\n594- # Get RAG context\n595- context = get_rag_context(order[\"briefing\"], collection, context_limit)\n596-\n597- # Build profile\/contract\/structure\n598- profile = None\n599- if order.get(\"profile_config\"):\n600- config = (",
"numLines": 31
}
}