semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

Python: (Astra DB) Explicit projection when reading from Astra DB

Open hemidactylus opened this issue 1 year ago • 0 comments

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

hemidactylus avatar May 14 '24 09:05 hemidactylus