Issue with Custom Skills in PandasAI when using OpenAI API #1419
-
Hi PandasAI community, First off, congratulations on maintaining this project—it's amazing! I was experimenting with the example on using "skills" as described in the official documentation. Instead of using BambooLLM, I’m working with OpenAI. I’ve added the @Skill decorator to create a function that should help me generate a bar plot with names on the vertical axis and rotated 45 degrees. This was intended as a simple test to see if it works. However, to my surprise, the resulting plot displayed the names on the horizontal axis, with no rotation. It appears that the custom skill I added was ignored. To investigate further, I used Could this be a bug, or is there something I may have configured incorrectly? Any insights or guidance would be greatly appreciated. Thanks
Output:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey there, @juancolonna! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together! The issue you're experiencing with the custom skill being ignored might be due to how the PandasAI agent determines which code to execute. The agent uses the function's docstring to provide context to the model, which influences the decision on when to use the custom skill. If the model's interpretation of the query doesn't align with the skill's docstring, it might not trigger the custom skill as expected [1][2]. Here are a few steps you can take to troubleshoot and potentially resolve the issue:
By following these steps, you should be able to better understand and address the issue with your custom skill in PandasAI. |
Beta Was this translation helpful? Give feedback.
Hey there, @juancolonna! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together!
The issue you're experiencing with the custom skill being ignored might be due to how the PandasAI agent determines which code to execute. The agent uses the function's docstring to provide context to the model, which influences the decision on when to use the custom skill. If the model's interpretation of the query doesn't align with the skill's docstring, it might not trigger the custom skill as expected [1][2].
Here are a few steps you can take to troubleshoot and potentially resolve the issue:
Check the Docstring: Ensure that the docstring of your
plot_salaries
func…