Skip to content

TopicPredictor

type TopicPredictor = (messages) => Promise<string[]>;

LLM-based topic predictor. Takes recent conversation messages and returns predicted follow-up queries that should be pre-fetched. When provided, this strategy runs instead of keyword extraction.

Parameter Type

messages

object[]

Promise<string[]>