(client: OpenAI)
| 97 | |
| 98 | |
| 99 | def test_basic(client: OpenAI): |
| 100 | # trying twice to test prompt caching |
| 101 | for rep in range(2): |
| 102 | response = client.completions.create( |
| 103 | model="", |
| 104 | prompt=abc_prompt, |
| 105 | max_tokens=20, |
| 106 | temperature=0.0, |
| 107 | ) |
| 108 | |
| 109 | assert response.choices[0].text == twenty_token_response |
| 110 | |
| 111 | |
| 112 | def test_decode_one_token(client: OpenAI): |
nothing calls this directly
no outgoing calls
no test coverage detected