Files
semantic-kernel/python/semantic_kernel
Stefano LottiniandEvan Mattson f7f5abca30 Python: (Astra DB) Explicit projection when reading from Astra DB (#6246)
### Motivation and Context

In view of upcoming changes in the Astra DB Data API, this PR explicitly
sets a projection every time a `find` command is executed, in order to
ensure all necessary fields of the document are returned by the API.

### Description

Added an else branch in the `astra_client.py` to ensure there always is
a "projection" field in the body for the `find` command. This ensures
that `$vector` is returned by the API even in case of Astra DB rolling
out an exclude-it-by-default policy in the future.

### Contribution Checklist

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Evan Mattson <[email protected]>
2024-05-28 19:38:42 +00:00
..
2024-04-16 13:21:20 +00:00
2024-05-16 13:02:54 +00:00
2024-03-28 15:10:28 +00:00