Closed Russell-Pollari closed 1 year ago
@Russell-Pollari I think you are right.
Embeddings
is already an array of numbers. https://github.com/chroma-core/chroma/blob/main/clients/js/src/types.ts#L10
so we just need an array of that.
Distances
I think should be number[][];
as you said as well.
Thanks @Russell-Pollari !
fix incoming
What happened?
Came across while trying to update the langchainjs integration here
pushing
firstDistances[i]
intoresults
gives this errorLooks like QueryResult has distances typed to
number[][][]
, but langchain's expectation (and mine) isnumber[][]
Confirmed in chroma/clients/js/src/types.ts,
Isn't this incorrect? I think it should be:
New to typescript so might be missing something
Versions
chromadb v1.5.1 node v18.16.0
Relevant log output
No response