{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/QdrantClient.php",
"offset": 110,
"limit": 60
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/QdrantClient.php",
"content": " * Searches for similar vectors.\n *\n * @param array<int, float> $vector\n * @param array<string, mixed>|null $filter\n * @return array<array<string, mixed>>\n *\/\n public function search(string $collection, array $vector, int $limit = 5, ?array $filter = null): array\n {\n $url = sprintf('%s\/collections\/%s\/points\/search', $this->host, $collection);\n\n $payload = [\n 'vector' => array_values($vector),\n 'limit' => $limit,\n 'with_payload' => true,\n ];\n\n if ($filter !== null) {\n $payload['filter'] = $filter;\n }\n\n $response = $this->request($url, $payload, 'POST');\n\n if (!isset($response['result']) || !is_array($response['result'])) {\n return [];\n }\n\n return $response['result'];\n }\n\n \/**\n * Deletes points by IDs.\n *\n * @param array<string> $ids\n *\/\n public function deletePoints(string $collection, array $ids): bool\n {\n $url = sprintf('%s\/collections\/%s\/points\/delete', $this->host, $collection);\n\n $data = [\n 'points' => $ids,\n ];\n\n try {\n $this->request($url, $data, 'POST');\n\n return true;\n } catch (RuntimeException) {\n return false;\n }\n }\n\n \/**\n * Generates a UUID v4.\n *\/\n public function generateUuid(): string\n {\n $data = random_bytes(16);\n $data[6] = chr((ord($data[6]) & 0x0f) | 0x40);\n $data[8] = chr((ord($data[8]) & 0x3f) | 0x80);\n",
"numLines": 60,
"startLine": 110,
"totalLines": 237
}
}
}