-
Notifications
You must be signed in to change notification settings - Fork 133
Make GraphRAG search's query backwards compatible #97
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
Make GraphRAG search's query backwards compatible #97
Conversation
@CodiumAI-Agent /update_changelog |
Changelog updates: 🔄 2024-08-08Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
- Add optional custom_prompt arg to the Text2CypherRetriever class. | ||
|
||
|
||
### Changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we add a "Deprecation notice" section to make it even more visible?
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
elif isinstance(query, str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to test for the type of query
here?
|
||
### Changed | ||
- `GraphRAG.search` method first parameter has been renamed `query_text` (was `query`) for consistency with the retrievers interface. | ||
- Made `GraphRAG.search` method backwards compatible with the query parameter, raising warnings to encourage using query_text instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we need a line in changelog for that, maybe rephrasing the previous one would be nicer. Something like:
`query` parameter in GraphRAG.search` was deprecated and will be removed in the next major release. Use `query_text` instead.
* Make query backwards compatible * Update CHANGELOG
* Make query backwards compatible * Update CHANGELOG
Description
#89 A previous PR removed the
query
argument fromGraphRAG
's.search()
which is a breaking change. This PR allows the argumentquery
to still be used, but raises warnings for the user to start usingquery_text
.Type of Change
Complexity
Complexity: Low
How Has This Been Tested?
Checklist
The following requirements should have been met (depending on the changes in the branch):