How to mock OpenAI's client
- asyncio
- typer
- openai
- tenacity
- pytest
- unittest
- httpx
- respx
- uv
- ruff
- dotenv
Set OPENAI_API_KEY in .env
Install uv with
curl -LsSf https://astral.sh/uv/install.sh | sh
Run with
uv run mopenai/main.py "How are you?"
Test with
pytest