It keeps having syntax error and not generating charts. Please advise
This is a tricky action. You need to provide a bit of information to get a good chart. Usually it wants:
- Values
- A title for the chart
- X-axis label
- Y-axis label
- Color scheme
What error did you get specifically? Can you share it here. Tagging @nathaniel to check this out as well
I am trying to generate charts using the code interpreter action. Its fiddly. I think it generates the chart but display gets broken. Of 10 times, it will show up 5 times and the rest of the times the display is broken.
Hey, I get no chart outcomes at all. Did you manage to get it to work?
What is not working for you? Is it giving you a particular error message?
I worked in the OpeanAI playground with GPT-4o (and set the LLM to GPT 4-o in the Pickaxe) to synchronize the core bot prompt (in natural language), and the trigger prompt for the trigger prompt action and the user inputs. I ensured that all 3 were logically coherent and tested multiple times. The was no specific error, it just did not generate a chart. I made sure that both the core and trigger prompts collected metadata from specific user inputs and organized it into X and Y-axis but it did not work.
I then tried creating a custom action, but I believe the action code section is limited to Python so I cannot use specific JS packages such as Chart.js.
Now, I’m testing:
- mapping out make automation with an API from https://quickchart.io/ - it also looks like they have a module on Make.com, but so far their support team has not responded on how I can get access to their API for a key. It looks like a promising tool. I will try to update if I’m successful.
- mapping out a make diagram to generate charts with GPT-4o.
If you guys can fix the current chart generator action to connect API with https://quickchart.io/ I think it could solve the issue.
Maybe @stephenasuncion or @nathaniel could help you with this issue. It’s a little beyond my expertise.
Ok thx, Mike. The chart action is essential for a couple of the PAs I’m building. Looking forward to hearing from Stephen or Nathaniel!
The chart generator seems to work alright for me. If you aren’t getting the behavior your want, you can always make a custom action. Another option would be to use code interpreter instead, and specifically ask it to use matplotlib or seaborn to make you a chart.
Hope that helps!
@nathaniel @admin_mike It would be helpful to have a video tutorial on how to get charts and bars other graphs from data provided by a knowledge base. Do you have any suggestions for a newbie?
Well, it’s a great question. It depends what data you have in the knowledge base. Is it more like textual data, or tables and charts in the KB?
@nathaniel
i followed @admin_mike suggestions about the prompt, and i got some results but not satisfactory.
The knowledge base is a pdf file that contains macroeconomic data of 6 listed countries that can be selected. after generating the table for the chosen country the system should generate a comparative graph for one or more indicators.
here i show you a video: https://share.nmblc.cloud/10fc99ad
another sample: https://share.nmblc.cloud/4995a4f8
if you want, i can privately send you the link of the system. or maybe share the prompt and the database if you want to go deeper and use it as a case study.
Cool. I will try that method out and update with results soon.
Did you try switching the LLM over to GPT-4o? Sometimes that does the trick if you are at least getting some results.
Hi @Ned.Malki changing the model the result does not improve, I am happy with claude sonnet 3.5
I created a custom action and went with the matplotlib rout. There seem to be strict limitations on the action code section that’s preventing matplotlib backend dependencies from being imported/written to memory or executed. I even encountered issues of hardcoded code importing packages I previously manually removed (I posted about it here).
Here’s the error I keep getting. I tried tackling the issue with GPT 4o and o1 but keep getting the same error;
Here’s what o1 says when troubleshooting:
The studio I’m working on consists of sequential GPTs that rely on the previous one, so the current one is supposed to generate charts for the users, as long as I’m stuck here, I cannot launch the studio.
@nathaniel check this out
Hey @zerodot did you manage to get this to work?
I think you were referring to the code interpreter action within Pickaxe, right? I assumed you meant CI in ChatGPT. I’m testing the code interpreter action-- route now, I’ve been waiting for over 10 mins for a chart to generate.
Update: I decided to switch over to tables (using a Code Interpreter action) instead of charts since it presents the data in a more user-friendly way and requires less configuration time.
The problem I was attempting to visualize more than 1 data point for both the X & Y axis, which made it difficult for ‘matplotlib’ and the community ‘Chart Generator’ action to visualize. It’s possible to make it happen with ChatGPT instead, but for my use case, a table got the job done.
I am having the same issue as everyone else. I have chatbots that help tutor in different subjects and once in a while needs to do a chart based off the information it has already provided and it hardly ever works. Consistently gives a syntax error. Has anyone found a fix for this. Using chatgpt-o. Thank you.