Smart Search Interpretation Result (Interpret/InterpretResult.php)

synaplan · backend/src/Service/SmartSearch/Interpret/InterpretResult.php · php · Apache-2.0
ai, search, lang:php, tag:data-transfer

Encapsulates the structured intent and outcome parsed from an AI smart search query. Use when handling natural language search interpretations.

// Source: https://github.com/metadist/synaplan | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
<?php

declare(strict_types=1);

namespace App\Service\SmartSearch\Interpret;

/**
 * What the AI tier made of a question. `targetIds` only ever holds ids the
 * caller sent as candidates, best first.
 */
final readonly class InterpretResult
{
    public const INTENTS = ['navigate', 'change_setting', 'run_command', 'find', 'answer'];
    public const OUTCOMES = ['ok', 'no_match', 'failed', 'limit_reached'];

    /**
     * @param 'ok'|'no_match'|'failed'|'limit_reached'                       $outcome
     * @param 'navigate'|'change_setting'|'run_command'|'find'|'answer'|null $intent
  

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key