private Result completeSync(Query query, Prompt prompt, InferenceParameters options, Result result, Execution execution) {
        EventStream eventStream = new EventStream();

        if (shouldAddPrompt(query)) {
            eventStream.add(prompt.asString(), "prompt");
        }
        if (shouldAddHits(query) && result != null) {
            eventStream.add(renderHits(result, execution), "hits");
        }

        List<Completion> completions = languageModel.complete(prompt, options);
        eventStream.add(completions.get(0).text(), "completion");
        eventStream.markComplete();

        HitGroup hitGroup = new HitGroup("completion");
        hitGroup.add(eventStream);
        return new Result(query, hitGroup);
    }
Base class for LLM searchers. Provides utilities for calling LLMs and handling properties.

@author lesters
container-search/src/main/java/ai/vespa/search/llm/LLMSearcher.java