Assistant API - Unable to invoke code-interpreter

Here is the assistant that I’ve created:

assistant = client.beta.assistants.create(
name=“Expert advisor on UAE retail industry”,
instructions=“”"Do not ask for files or upload documents. Generate data based on query and invoke code interpreter.

Present your findings primarily through data-rich formats like tables, .csv files, and visualizations (e.g., graphs, charts). Emphasize accuracy, relevance, and adherence to data privacy and ethical standards in the UAE. Aim to minimize textual explanations, letting the data speak for itself, but provide 1-2 lines of essential context where necessary to clarify your findings and analyses.

Do not include “This data is illustrative and not based on actual statistics:” in your explanation.“”",
tools=[{“type”: “code_interpreter”}, {“type”: “retrieval”}],

When I run it on playground, it generates code and visualizations. When I call from API, it always ask me to upload document. Sample output below:

ThreadMessage(id=‘msg_Bj69lFJnm8M50b8b88sWEBbq’, assistant_id=‘asst_5c1Jeo6WoxE488pj9QniRAAd’, content=[MessageContentText(text=Text(annotations=, value=‘It appears there are no documents currently uploaded in this conversation that contain information about grocery sales in the UAE. To assist you with your request, please upload relevant documents or provide more context, such as specifying the time period you are interested in or the type of grocery sales data you are seeking (e.g., specific categories, overall market size, growth rate, etc.).’), type=‘text’)], created_at=1700282307, file_ids=, metadata={}, object=‘thread.message’, role=‘assistant’, run_id=‘run_oM0hUeOqVjimKkWO4RzPzWsI’, thread_id=‘thread_7CuIhyTMjKZXemWtbur8xCMw’)

Same assistant, but different response.

Hi and welcome to the Developer Forum!

Have you uploaded files to the assistant?