Skip to content

Commit

Permalink
docs: add description of open_charts option (#817)
Browse files Browse the repository at this point in the history
* (docs): update getting-started manual, add a description for
  `open_charts` parameter;
* (docs): update docstring of `format_plot()` as well;
  • Loading branch information
nautics889 authored Dec 13, 2023
1 parent 5f03916 commit 07f285d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ Settings:
- `enforce_privacy`: whether to enforce privacy. Defaults to `False`. If set to `True`, PandasAI will not send any data to the LLM, but only the metadata. By default, PandasAI will send 5 samples that are anonymized to improve the accuracy of the results.
- `save_charts`: whether to save the charts generated by PandasAI. Defaults to `False`. You will find the charts in the root of your project or in the path specified by `save_charts_path`.
- `save_charts_path`: the path where to save the charts. Defaults to `exports/charts/`. You can use this setting to override the default path.
- `open_charts`: whether to open the chart during parsing of the response from the LLM. Defaults to `True`. You can completely disable displaying of charts by setting this option to `False`.
- `enable_cache`: whether to enable caching. Defaults to `True`. If set to `True`, PandasAI will cache the results of the LLM to improve the response time. If set to `False`, PandasAI will always call the LLM.
- `use_error_correction_framework`: whether to use the error correction framework. Defaults to `True`. If set to `True`, PandasAI will try to correct the errors in the code generated by the LLM with further calls to the LLM. If set to `False`, PandasAI will not try to correct the errors in the code generated by the LLM.
- `max_retries`: the maximum number of retries to use when using the error correction framework. Defaults to `3`. You can use this setting to override the default number of retries.
Expand Down
5 changes: 4 additions & 1 deletion pandasai/responses/response_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def format_dataframe(self, result: dict) -> Any:

def format_plot(self, result: dict) -> Any:
"""
Display matplotlib plot against a user query
Display matplotlib plot against a user query.
If `open_charts` option set to `False`, the chart won't be displayed.
Args:
result (dict): result contains type and value
Returns:
Expand Down

0 comments on commit 07f285d

Please sign in to comment.