This repository was archived by the owner on Jun 3, 2026. It is now read-only.
v0.123.0
Added
-
classifymodel function (docs) for classifying values. TheSemanticClassifierhas been renamed toEmbeddingSimilarityClassifierand can be used in conjunction withclassify:import { classify, EmbeddingSimilarityClassifier, openai } from "modelfusion"; const classifier = new EmbeddingSimilarityClassifier({ embeddingModel: openai.TextEmbedder({ model: "text-embedding-ada-002" }), similarityThreshold: 0.82, clusters: [ { name: "politics" as const, values: [ "they will save the country!", // ... ], }, { name: "chitchat" as const, values: [ "how's the weather today?", // ... ], }, ], }); // strongly typed result: const result = await classify({ model: classifier, value: "don't you love politics?", });