Repository navigation
Commit eb1a832
Resolve completion failures from an unexpected exception thrown in the Qdrant Connector (microsoft#719)
### Motivation and Context
An unexpected exception is being thrown when attempting to find nearest
vectors and no vectors exist. This results in the current completion
activity to fail. An example of this behavior can be observed in the
copilot-sample-app by changing the MemoriesStore type in appsettings
from "volatile" to "qdrant". All subsequent chat completions will fail.
There are seven other API requests in this same class which all use
roughly the same conventions and handling of the HTTP request /
response. _FindNearestInCollectionAsync_ is the only one of the eight
total which doesn't explicitly check or catch to prevent an exception.
For more details and context, see the write-up outlined in the linked
issue: microsoft#694
### Description
Align HTTP response behavior in FindNearestInCollectionAsync to match
the consistent behavior uniformly observed for HTTP request/response
handling. This amounts to simply breaking when the response status code
is NotFound.1 parent 85e5ff9 commit eb1a832
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
303 | 310 | | |
304 | 311 | | |
305 | 312 | | |
| |||
0 commit comments