createWeatherPreProcessor
createWeatherPreProcessor(
options:WeatherPreProcessorOptions):PromptPreProcessor
Defined in: src/lib/chat/weatherClassifier.ts:100
Build a pre-processor that runs weather classification on the shared
embedding provided by runToolLoop, and — if the classifier decides
the prompt is asking for weather — invokes the caller-supplied
fetchWeatherData and injects the result into the conversation.
The SDK does not run the weather lookup itself; the caller wires up whichever provider they want (OpenMeteo, AccuWeather, weather.gov, etc.).
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
Last updated on