| 37 | } |
| 38 | |
| 39 | nlohmann::json OpenAITestFixture::createValidChatCompletionResponse() { |
| 40 | return nlohmann::json{ |
| 41 | {"id", "chatcmpl-test123"}, |
| 42 | {"object", "chat.completion"}, |
| 43 | {"created", 1234567890}, |
| 44 | {"model", kTestModel}, |
| 45 | {"system_fingerprint", "fp_test123"}, |
| 46 | {"choices", nlohmann::json::array( |
| 47 | {{{"index", 0}, |
| 48 | {"message", |
| 49 | {{"role", "assistant"}, |
| 50 | {"content", "Hello! How can I help you today?"}}}, |
| 51 | {"finish_reason", "stop"}}})}, |
| 52 | {"usage", |
| 53 | {{"prompt_tokens", 10}, |
| 54 | {"completion_tokens", 20}, |
| 55 | {"total_tokens", 30}}}}; |
| 56 | } |
| 57 | |
| 58 | nlohmann::json OpenAITestFixture::createErrorResponse( |
| 59 | int /* status_code */, |
nothing calls this directly
no outgoing calls
no test coverage detected