getSearchEngine

Load a SearchEngine from a SearchIndexStore

Overview

Loads and caches a SearchEngine instance from a SearchIndexStore. This is used by DefaultChatRuntime when no searchEngine is provided.

Type Definition

import type { SearchEngine, SearchIndexStore } from '@peam-ai/search';

export declare function getSearchEngine(store: SearchIndexStore): Promise<SearchEngine | undefined>;

Notes

  • Returns undefined if the index is missing or empty.
  • Caches the SearchEngine instance in memory.

On this page

GitHubEdit this page on GitHub