e2b-dev / code-interpreter

Python & JS/TS SDK for adding code interpreting to your AI app
https://e2b.dev
Apache License 2.0
809 stars 51 forks source link

fix README JS SDK charts #4

Closed im-calvin closed 2 months ago

im-calvin commented 2 months ago

small fix from the README. Let me know if it should be something else / y'all have plans to update it in the future

im-calvin commented 2 months ago

I can't seem to get the image out from the result. But looking at this makes me think that the README should actually say result.data[0].png, not result.data[0]['image/png']. Any advice here?

image

mlejva commented 2 months ago

Ah, sorry yes. The JS SDK isn't completely up to date to the Python version.

I can't seem to get the image out from the result.

How does the code you sent to execCell() looks like in this example?

im-calvin commented 2 months ago

Sorry I was being stupid it was a problem on my end. Anyways, yeah the README should say data[0].png :)

mlejva commented 2 months ago

I'll update the readme. It might actually be this in the near future 😅

const execution = await codeInterpreter.notebook.execCell(...)
execution.results[0].png
im-calvin commented 2 months ago

Yeah no worries, I figured it seemed a little too similar to the Python version