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

Method Predict

backend/go/cloud-proxy/proxy.go:205–211  ·  view source on GitHub ↗

Predict is the legacy (string, error) AIModel signature. Used only if a caller goes through the non-rich path (it shouldn't, since server.go prefers PredictRich). Provided so the AIModel interface is satisfied for backends that haven't opted into the rich variant.

(opts *pb.PredictOptions)

Source from the content-addressed store, hash-verified

203// server.go prefers PredictRich). Provided so the AIModel interface
204// is satisfied for backends that haven't opted into the rich variant.
205func (c *CloudProxy) Predict(opts *pb.PredictOptions) (string, error) {
206 reply, err := c.PredictRich(opts)
207 if err != nil {
208 return "", err
209 }
210 return string(reply.GetMessage()), nil
211}
212
213// PredictStream is the legacy chan-string streaming path. Adapts the
214// rich stream by extracting only content text — tool-call-only chunks

Callers 1

Calls 1

PredictRichMethod · 0.95

Tested by 1