Content-Length: 263975 | pFad | https://github.com/googleapis/langchain-google-cloud-sql-pg-python/issues/185

438 fix: Fix QueryOptions not applied to similarity search bug by duwenxin99 · Pull Request #185 · googleapis/langchain-google-cloud-sql-pg-python · GitHub
Skip to content

fix: Fix QueryOptions not applied to similarity search bug #185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Conversation

duwenxin99
Copy link
Contributor

The index QueryOptions are set by executing SET LOCAL, whose effect only last within the same transaction. However, currently the similarity search is in a different transaction, which means the query options are never applied. I fixed this by creating a new _afetch_with_query_options(query, query_options) method that executes the query options statement before fetching similarity search result, and modify the search APIs to call this method instead of _afetch()

@duwenxin99 duwenxin99 requested review from a team as code owners August 21, 2024 17:14
@product-auto-label product-auto-label bot added the api: cloudsql-postgres Issues related to the googleapis/langchain-google-cloud-sql-pg-python API. label Aug 21, 2024
@averikitsch averikitsch merged commit e5dca97 into main Aug 22, 2024
11 checks passed
@averikitsch averikitsch deleted the fix branch August 22, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudsql-postgres Issues related to the googleapis/langchain-google-cloud-sql-pg-python API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/langchain-google-cloud-sql-pg-python/issues/185

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy