WeatherPreProcessorOptions
Defined in: src/lib/chat/weatherClassifier.ts:66
Properties
fetchWeatherData()?
optionalfetchWeatherData: (prompt:string,options:object) =>Promise<string|LlmapiMessage[]>
Defined in: src/lib/chat/weatherClassifier.ts:77
Called with the caller’s weather provider when the classifier decides
the prompt is asking for weather. Return either a plain string
(wrapped by the SDK in a default user message) or a fully-formed
LlmapiMessage[] (full control over role/shape). Omit to run in
observer mode — classification still fires but nothing is injected.
The signal argument is forwarded from the tool loop so long-running
provider requests can be aborted when the caller aborts.
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
|
Returns
Promise<string | LlmapiMessage[]>
margin?
optionalmargin:number
Defined in: src/lib/chat/weatherClassifier.ts:86
Score margin: weatherScore must exceed noWeatherScore by at least
this amount to classify as “needs weather data”.
Default
0.02onClassification()?
optionalonClassification: (result:WeatherClassification) =>void
Defined in: src/lib/chat/weatherClassifier.ts:88
Observe the classification without injecting anything.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void