Skip to Content

classifyCryptoPrice

classifyCryptoPrice(prompt: string, options: CryptoPriceClassifierOptions): Promise<CryptoPriceClassification>

Defined in: src/lib/chat/cryptoPriceClassifier.ts:47 

Classify whether a prompt needs crypto price data.

Embeds the prompt and compares it against the pre-computed centroid vectors. Domain is crypto only — stocks and FX are handled by classifyStockPrice. Ambiguous prompts (e.g. “gold price”) may fire both crypto and stock classifiers — that’s expected; the caller can inject both sets of results.

Parameters

ParameterType

prompt

string

options

CryptoPriceClassifierOptions

Returns

Promise<CryptoPriceClassification>

Last updated on