ExMemvid.Retriever (ex_memvid v0.1.2)

A stateful GenServer for retrieving and decoding data from video memory.

This module manages the retriever's state, including a cache for decoded frames, ensuring that the cache persists across multiple calls. You start the server with start_link/3 and interact with it via the returned pid.

Summary

Functions

Returns a specification to start this module under a supervisor.

Performs a semantic search using the running Retriever server.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

search(pid, query, top_k \\ 5)

@spec search(pid :: pid(), query :: String.t(), top_k :: integer()) ::
  {:ok, [String.t()]} | {:error, term()}

Performs a semantic search using the running Retriever server.

start_link(video_path, index_path, config, opts \\ [])

Starts the Retriever GenServer.

Parameters

  • video_path - Path to the video file
  • index_path - Path to the index file
  • config - Configuration map
  • opts - GenServer options (e.g., name: MyRetriever)