(client: OpenAI)
| 132 | |
| 133 | |
| 134 | def test_n(client: OpenAI): |
| 135 | for n in range(1, 11): |
| 136 | response = client.completions.create( |
| 137 | model="", |
| 138 | prompt=abc_prompt, |
| 139 | max_tokens=20, |
| 140 | temperature=0.0, |
| 141 | n=n, |
| 142 | ) |
| 143 | |
| 144 | assert len(response.choices) == n |
| 145 | assert all(choice.text == twenty_token_response for choice in response.choices) |
| 146 | |
| 147 | |
| 148 | def test_stop(client: OpenAI): |
nothing calls this directly
no outgoing calls
no test coverage detected