-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore(QueryExecTracker): store and get last log id from query tracker #733
Conversation
WalkthroughThe recent changes primarily focus on tracking the last query log ID in the pandasai system. The Changes
Poem
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (4)
- pandasai/agent/init.py (1 hunks)
- pandasai/helpers/query_exec_tracker.py (7 hunks)
- pandasai/smart_dataframe/init.py (1 hunks)
- pandasai/smart_datalake/init.py (1 hunks)
Additional comments: 10
pandasai/agent/__init__.py (1)
- 209-215: The new property
last_query_log_id
is correctly retrieving the value from_lake.last_query_log_id
. Ensure that the_lake
object is always initialized before this property is accessed to avoid potentialAttributeError
.pandasai/smart_dataframe/__init__.py (2)
703-704: Ensure that the
sample_head
argument is a valid pandas DataFrame before converting it to CSV.706-708: The new property
last_query_log_id
is correctly retrieving the value from the_lake
attribute.pandasai/smart_datalake/__init__.py (1)
- 777-783: The new property
last_query_log_id
is correctly implemented and retrieves the last log ID from the_query_exec_tracker
as expected.pandasai/helpers/query_exec_tracker.py (6)
1-9: The new imports
json
anduuid
are used correctly in the code.32-35: The new attribute
_last_log_id
is initialized correctly in thestart_new_track
method and updated in thepublish
method.54-64: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [56-75]
The
add_query_info
method now acceptsconversation_id
asuuid.UUID
and stores it as a string. This change is consistent with the rest of the code.
83-84: The
_last_log_id
attribute is correctly reset in thestart_new_track
method.275-281: The
publish
method has been updated to parse the response and update the_last_log_id
. Ensure that the response from the server always contains thedata
field and that it is notNone
.290-296: The
last_log_id
property is correctly implemented to retrieve the_last_log_id
.
Summary by CodeRabbit
last_query_log_id
to track the last query log ID across multiple classes.add_query_info
method to acceptconversation_id
as a string.publish
method to parse response and update the last log ID.