IsNull reports whether p is the null no-op provider. Used by callers (HyDE, vector store) to decide whether to take the keyword-only fast path without calling Embed and getting an error back.
(p Provider)
| 76 | // (HyDE, vector store) to decide whether to take the keyword-only fast |
| 77 | // path without calling Embed and getting an error back. |
| 78 | func IsNull(p Provider) bool { |
| 79 | if p == nil { |
| 80 | return true |
| 81 | } |
| 82 | _, ok := p.(*Null) |
| 83 | return ok |
| 84 | } |
no outgoing calls