codeinterpreter-api icon indicating copy to clipboard operation
codeinterpreter-api copied to clipboard

Kernel Reestarting

Open MeliJuanmi opened this issue 1 year ago • 2 comments

Hi I am trying to run this code cell:

from codeinterpreterapi import CodeInterpreterSession
import os

# create a session
session = CodeInterpreterSession(openai_api_key="openai-api-key", model="gpt-3.5-turbo-0613")
await session.astart()

# generate a response based on user input
output = await session.generate_response(
    "Plot the Tesla stock for 2023 YTD"
)

# ouput the response (text + image)
print("AI: ", output.content)
for file in output.files:
    file.show_image()

# terminate the session
await session.astop()

The conection with the openAi is with an api_base connection and I get the following error:

image

MeliJuanmi avatar Jul 19 '23 23:07 MeliJuanmi

The error seems to be from codebox.astart(), what can I do for that ?

MeliJuanmi avatar Jul 20 '23 01:07 MeliJuanmi

I think that this issue (and solution) might be related: https://github.com/shroominic/codeinterpreter-api/issues/35#issuecomment-1644246608

juananpe avatar Jul 20 '23 20:07 juananpe