Protokoll #5161

ID5161
Zeitstempel2025-12-22 17:59:53.169415
Clientroot
IP145.224.96.190
Modellclaude-sonnet-4-20250514
Statuscompleted
Tokens300 (Input: 247, Output: 53)
Dauer212 ms
Request-Zeit2025-12-22 17:59:53.169415
Response-Zeit2025-12-22 17:59:53.381607

Request

{
    "event": "PreToolUse",
    "tool_name": "Bash",
    "tool_input": {
        "command": ".\/venv\/bin\/python -c \"\nimport requests\nfrom config import OLLAMA_HOST, EMBEDDING_MODEL\nfrom db import db\n\ndb.connect()\n\n# Get chunk content\ncursor = db.execute('SELECT content FROM chunks WHERE id = 8')\nchunk = cursor.fetchone()\ncursor.close()\ncontent = chunk['content']\n\nprint(f'Testing embedding for chunk with {len(content)} chars...')\n\n# Test with num_ctx\nresponse = requests.post(\n    f'{OLLAMA_HOST}\/api\/embeddings',\n    json={\n        'model': EMBEDDING_MODEL,\n        'prompt': content,\n        'options': {'num_ctx': 8192}\n    },\n    timeout=60\n)\n\nprint(f'Status: {response.status_code}')\nif response.status_code == 200:\n    data = response.json()\n    if 'embedding' in data:\n        print(f'SUCCESS: {len(data[\\\"embedding\\\"])} dimensions')\nelse:\n    print(f'Error: {response.text}')\n\ndb.disconnect()\n\"",
        "description": "Test embedding with extended context directly"
    }
}

Response

{
    "tool_response": {
        "stdout": "Testing embedding for chunk with 1787 chars...\nStatus: 500\nError: {\"error\":\"the input length exceeds the context length\"}",
        "stderr": "",
        "interrupted": false,
        "isImage": false
    }
}
← Vorheriger Zur Liste Nächster →