Replicating GPT4o web behavior in Python code

Hi everyone,
I’m seeking help with interpreting the example code on the OpenAI website regarding the use of an agent.

On GPT-4o, I provided instructions to analyze Excel files containing feasibility study data. The functionality is perfect; the agent receives the user’s request from the web, reads the data from the xlsx files in the knowledge base, and provides the answer.
GPT-4 performs significantly better than 4 in analyzing Excel files, based on the test results.

Following the example instructions at this URL:, I am trying to create an agent using Python that interprets the exact same instructions I provided to the agent in the GPT-4o interface. However, when asked, “What can you respond to?”, the answer is very generic and not tailored to the given instructions, stating that it can respond to any topic.
Performing the same test from Assistants Playground, the functionality is identical to the web version: it only seems not to work through code.

What could be the reason for this different behavior?

Thanks for any suggestions.

I’ve read at least two other threads about this behavior, both without a final fix. Just copying and pasting the code OpenAI supplies with different instructions makes it easy to verify that the agent’s reply would not comply with the instructions (temperature=0).

This was a dumb post, sorry. The problem was my code; the OpenAI example works flawlessly.