codeinterpreter-api
codeinterpreter-api copied to clipboard
Possibly a JavaScript package?
I’d like to integrate something like this into my next JS project. Would it be worthwhile for me to at least attempt to rewrite this code, or should I setup something like a flask server and do it with API calls?
It's hard to start a jupyter kernel in the frontend so you need a cloud-hosted solution. This is what CodeBox is for (beta release in the next few days). But even with the CodeBox API, you need to make sure the API-Key is stored in a backend because otherwise it will get leaked and this would be expensive. It's currently not possible to create such an application without a backend so the only working idea would be to release a JS Backend solution. I am not a lot into JS so this task seems a bit hard for me but maybe someone else can work on this. The current best solution, for now, would be to use a Python Backend like FastAPI/Flask or Django :)
In case you want to implement the CodeBox API to your JS Backend you could do it using the pure REST API. You can check out how this works here: https://codeboxapi.com/docs
In case you want to implement the CodeBox API to your JS Backend you could do it using the pure REST API.
You can check out how this works here: https://codeboxapi.com/docs
So correct me if I’m wrong, but codebox is your solution to host something like this on its own? Meaning I can use codebox to run the interpreter and just make API calls to it? I assume I’d have to give codebox my OpenAI key?
No, the OpenAI calls are not passed through the CodeBox. Only the Python code execution is done inside the CodeBox with the given files. You can look up the code its open source :)
No, the OpenAI calls are not passed through the CodeBox. Only the Python code execution is done inside the CodeBox with the given files. You can look up the code its open source :)
Ah okay thank you! I think I understand now.