MCPcopy Index your code
hub / github.com/kagent-dev/kagent / makeVector

Function makeVector

go/core/internal/httpserver/handlers/memory_test.go:20–26  ·  view source on GitHub ↗

makeVector returns a float32 slice of length n filled with the given value. Used to produce valid 768-dimensional test vectors.

(n int, val float32)

Source from the content-addressed store, hash-verified

18// makeVector returns a float32 slice of length n filled with the given value.
19// Used to produce valid 768-dimensional test vectors.
20func makeVector(n int, val float32) []float32 {
21 v := make([]float32, n)
22 for i := range v {
23 v[i] = val
24 }
25 return v
26}
27
28func TestMemoryHandler(t *testing.T) {
29 setupHandler := func(t *testing.T) (*handlers.MemoryHandler, *mockErrorResponseWriter) {

Callers 1

TestMemoryHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected