MCPcopy
hub / github.com/redis/go-redis / appendArgs

Method appendArgs

vectorset_commands.go:186–209  ·  view source on GitHub ↗
(args []any)

Source from the content-addressed store, hash-verified

184}
185
186func (v VAddArgs) appendArgs(args []any) []any {
187 if v.Cas {
188 args = append(args, "cas")
189 }
190
191 if v.NoQuant {
192 args = append(args, "noquant")
193 } else if v.Q8 {
194 args = append(args, "q8")
195 } else if v.Bin {
196 args = append(args, "bin")
197 }
198
199 if v.EF > 0 {
200 args = append(args, "ef", strconv.FormatInt(v.EF, 10))
201 }
202 if len(v.SetAttr) > 0 {
203 args = append(args, "setattr", v.SetAttr)
204 }
205 if v.M > 0 {
206 args = append(args, "m", strconv.FormatInt(v.M, 10))
207 }
208 return args
209}
210
211// `VADD key [REDUCE dim] (FP32 | VALUES num) vector element [CAS] [NOQUANT | Q8 | BIN] [EF build-exploration-factor] [SETATTR attributes] [M numlinks]`
212// note: the API is experimental and may be subject to change.

Callers 5

VAddWithArgsMethod · 0.45
VSimWithArgsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected