Skip to content

Commit

Permalink
fix: remove "do not import anything" from prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
gventuri committed Oct 2, 2023
1 parent 6f28eac commit 7872a8a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/prompt-templates/correct_error_prompt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ You generated this python code:
It fails with the following error:
{error_returned}

Correct the python code and return a new python code (do not import anything) that fixes the above mentioned error. Do not generate the same code again.
Correct the python code and return a new python code that fixes the above mentioned error. Do not generate the same code again.
2 changes: 1 addition & 1 deletion pandasai/prompts/correct_error_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
It fails with the following error:
{error_returned}
Correct the python code and return a new python code (do not import anything) that fixes the above mentioned error. Do not generate the same code again.
Correct the python code and return a new python code that fixes the above mentioned error. Do not generate the same code again.
""" # noqa: E501

from .base import FileBasedPrompt
Expand Down
2 changes: 1 addition & 1 deletion tests/prompts/test_correct_error_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ def test_str_with_args(self):
It fails with the following error:
Error message
Correct the python code and return a new python code (do not import anything) that fixes the above mentioned error. Do not generate the same code again.
Correct the python code and return a new python code that fixes the above mentioned error. Do not generate the same code again.
""" # noqa: E501
)
2 changes: 1 addition & 1 deletion tests/test_smartdatalake.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def analyze_data(df):
It fails with the following error:
Test error
Correct the python code and return a new python code (do not import anything) that fixes the above mentioned error. Do not generate the same code again.
Correct the python code and return a new python code that fixes the above mentioned error. Do not generate the same code again.
""" # noqa: E501
)

Expand Down

0 comments on commit 7872a8a

Please sign in to comment.