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

Method createStreamingEvents

tests/utils/test_fixtures.cpp:252–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252std::vector<std::string> TestDataGenerator::createStreamingEvents() {
253 return {
254 "data: "
255 "{\"id\":\"chatcmpl-stream1\",\"object\":\"chat.completion.chunk\","
256 "\"created\":1234567890,\"model\":\"gpt-4o\",\"choices\":[{\"index\":0,"
257 "\"delta\":{\"content\":\"Hello\"},\"finish_reason\":null}]}\n\n",
258 "data: "
259 "{\"id\":\"chatcmpl-stream1\",\"object\":\"chat.completion.chunk\","
260 "\"created\":1234567890,\"model\":\"gpt-4o\",\"choices\":[{\"index\":0,"
261 "\"delta\":{\"content\":\" world\"},\"finish_reason\":null}]}\n\n",
262 "data: "
263 "{\"id\":\"chatcmpl-stream1\",\"object\":\"chat.completion.chunk\","
264 "\"created\":1234567890,\"model\":\"gpt-4o\",\"choices\":[{\"index\":0,"
265 "\"delta\":{\"content\":\"!\"},\"finish_reason\":\"stop\"}]}\n\n",
266 "data: [DONE]\n\n"};
267}
268
269std::vector<std::string> TestDataGenerator::createAnthropicStreamingEvents() {
270 return {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected