#API Assistants: Code Interpreter Jupyter-ish output not available in the API

1 messages · Page 1 of 1 (latest)

solid craneBOT
#

Reported by @tight quest

Bug Report: API Assistants: Code Interpreter Jupyter-ish output not available in the API
`Steps to Reproduce`

Using the API to create an Assistant that uses the code interpreter often results in the model writing code like:

#calcs removed

(time_to_max_height, max_height, total_time_in_air, horizontal_range)
`Expected Result`

If the model had instead written code with a print() statement, the output would show in:

"code": {
              "input": "# Calculating 2 + 2\nresult = 2 + 2\nresult",
              "outputs": [
                {
                  "type": "logs",
                  "logs": "4"

As per the API documentation

`Actual Result`

When the model decides to write code in this jupyter notebook style where variables are printed without using print() statements, the output is available to the model, but can not be found anywhere in the API response, which only provides the console logs of the script that ran.

`Environment`

OpenAI API (Python)