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)
| 203 | // server.go prefers PredictRich). Provided so the AIModel interface |
| 204 | // is satisfied for backends that haven't opted into the rich variant. |
| 205 | func (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 |