MCPcopy Create free account
hub / github.com/ClickHouse/ai-sdk-cpp / createFullValidResponse

Method createFullValidResponse

tests/utils/test_fixtures.cpp:203–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203nlohmann::json TestDataGenerator::createFullValidResponse() {
204 return nlohmann::json{
205 {"id", "chatcmpl-full123"},
206 {"object", "chat.completion"},
207 {"created", 1234567890},
208 {"model", "gpt-4o"},
209 {"system_fingerprint", "fp_full123"},
210 {"choices",
211 nlohmann::json::array(
212 {{{"index", 0},
213 {"message",
214 {{"role", "assistant"},
215 {"content", "This is a complete response with all fields."}}},
216 {"finish_reason", "stop"},
217 {"logprobs", nullptr}}})},
218 {"usage",
219 {{"prompt_tokens", 25},
220 {"completion_tokens", 45},
221 {"total_tokens", 70}}}};
222}
223
224nlohmann::json TestDataGenerator::createResponseWithUsage(
225 int prompt_tokens,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected