MCPcopy
hub / github.com/mudler/LocalAI / TokenClassify

Method TokenClassify

core/backend/token_classify.go:58–64  ·  view source on GitHub ↗
(ctx context.Context, text string)

Source from the content-addressed store, hash-verified

56}
57
58func (m *modelTokenClassifier) TokenClassify(ctx context.Context, text string) ([]TokenEntity, error) {
59 fn, err := ModelTokenClassify(text, m.opts, m.loader, m.modelConfig, m.appConfig)
60 if err != nil {
61 return nil, err
62 }
63 return fn(ctx)
64}
65
66// ModelTokenClassify loads the backend for modelConfig and returns a
67// closure that classifies `text`. Mirrors ModelScore: the closure is

Callers

nothing calls this directly

Calls 2

ModelTokenClassifyFunction · 0.85
fnFunction · 0.50

Tested by

no test coverage detected