Commit 951b487
committed
fix(langchain): guard empty query_vector via len() for Sequence compatibility
similarity_search() now uses len(query_vector) == 0 instead of truthiness
to avoid ValueError on numpy.ndarray and other Sequence types.1 parent c9246ac commit 951b487
2 files changed
Lines changed: 8 additions & 1 deletion
File tree
- langchain-coordinode/langchain_coordinode
- tests/integration/adapters
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| |||
0 commit comments