Protokoll #3706

ID3706
Zeitstempel2025-12-22 08:25:12.168879
Clientroot
IP
Warning: Undefined array key "request_ip" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 13

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 13
Modellclaude-sonnet-4-20250514
Statuscompleted
Tokens543 (Input: 0, Output: 0)
Dauer92 ms
Request-Zeit
Warning: Undefined array key "request_timestamp" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 18
Response-Zeit-

Warning: Undefined array key "error_message" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 22

Request

{
    "event": "PreToolUse",
    "tool_name": "Read",
    "tool_input": {
        "file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/OllamaService.php",
        "limit": 60
    }
}

Response

{
    "tool_response": {
        "type": "text",
        "file": {
            "filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/OllamaService.php",
            "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\AI;\n\nuse RuntimeException;\n\n\/**\n * Service for interacting with Ollama API for embeddings and text generation.\n *\n * Provides methods to:\n * - Generate embeddings from text using models like mxbai-embed-large\n * - Generate text responses using LLMs like gemma3:4b-it-qat\n * - Check API availability and health status\n *\n * This service uses cURL for HTTP requests without external dependencies.\n * All methods include proper timeout handling and exception management.\n *\n * @package Infrastructure\\AI\n * @author  System Generated\n * @version 1.0.0\n *\/\nfinal readonly class OllamaService\n{\n    \/**\n     * Default timeout for HTTP requests in seconds.\n     *\/\n    private const int DEFAULT_TIMEOUT = 60;\n\n    \/**\n     * Health check timeout in seconds.\n     *\/\n    private const int HEALTH_CHECK_TIMEOUT = 5;\n\n    \/**\n     * Constructs a new OllamaService instance.\n     *\n     * @param string $host The Ollama API host URL (default: http:\/\/localhost:11434)\n     *\/\n    public function __construct(\n        private string $host = 'http:\/\/localhost:11434'\n    ) {\n    }\n\n    \/**\n     * Generates an embedding vector for the given text.\n     *\n     * Uses the specified model to convert text into a numerical vector representation.\n     * The default model mxbai-embed-large produces 1024-dimensional embeddings.\n     *\n     * @param string $text  The text to embed\n     * @param string $model The embedding model to use (default: mxbai-embed-large)\n     *\n     * @return array<int, float> The embedding vector as an array of floats\n     *\n     * @throws RuntimeException If the API request fails or returns invalid data\n     *\n     * @example\n     * $service = new OllamaService();",
            "numLines": 60,
            "startLine": 1,
            "totalLines": 240
        }
    }
}
← Vorheriger Zur Liste Nächster →