Skip to main content
Example showing how to use a non-reasoning model as a reasoning model. For reasoning, we recommend using a Reasoning Agent (with reasoning=True), or to use an appropriate reasoning model with reasoning_model.
1

Add the following code to your Python file

non-reasoning-model-cot.py
2

Set up your virtual environment

3

Install dependencies

4

Export your OpenAI API key

5

Run Agent