-
Notifications
You must be signed in to change notification settings - Fork 747
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
feat: structured loader #1395
feat: structured loader #1395
Conversation
…camel into feat/structured_loader
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Co-authored-by: liuxukun2000 <xukunliu2025@u.northwestern.edu> Co-authored-by: Xukun Liu <57486241+liuxukun2000@users.noreply.github.com>
if isinstance(data, DataFrame): | ||
return SmartDataframe(data, config=self.config) | ||
file_path = str(data) | ||
path = Path(file_path) | ||
if not file_path.startswith("http") and not path.exists(): | ||
raise FileNotFoundError(f"File {file_path} not found") | ||
if path.suffix in self.__LOADER: | ||
return SmartDataframe( | ||
self.__LOADER[path.suffix](file_path, *args, **kwargs), # type: ignore[operator] | ||
config=self.config, | ||
) | ||
else: | ||
raise ValueError(f"Unsupported file format: {path.suffix}") |
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.
I think the loader is made for agent
. We are not expect to use LLM
to ask questions here. If we do want to use a chat
method. Should we have at least a wrapper chat
method if we want to use SmartDataframe
from pandasai
or we can add it into toolkit?
Description
Describe your changes in detail.
Motivation and Context
close #1325
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Implemented Tasks
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!