Create an OpenAIAPI instance using api_base + port pattern.
()
| 43 | |
| 44 | @pytest.fixture |
| 45 | def api_with_port(): |
| 46 | """Create an OpenAIAPI instance using api_base + port pattern.""" |
| 47 | return OpenAIAPI( |
| 48 | model="test-model", |
| 49 | key="test-key", |
| 50 | api_base="http://localhost", |
| 51 | port=8000, |
| 52 | retry=2, |
| 53 | wait=0.01, |
| 54 | timeout=(5, 30), |
| 55 | ) |
| 56 | |
| 57 | |
| 58 | @pytest.fixture |