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

Method createValidAnthropicResponse

tests/utils/test_fixtures.cpp:118–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118nlohmann::json AnthropicTestFixture::createValidAnthropicResponse() {
119 return nlohmann::json{
120 {"id", "msg_test123"},
121 {"type", "message"},
122 {"role", "assistant"},
123 {"content",
124 nlohmann::json::array(
125 {{{"type", "text"}, {"text", "Hello! How can I help you today?"}}})},
126 {"model", kTestAnthropicModel},
127 {"stop_reason", "end_turn"},
128 {"stop_sequence", nullptr},
129 {"usage", {{"input_tokens", 10}, {"output_tokens", 20}}}};
130}
131
132nlohmann::json AnthropicTestFixture::createAnthropicErrorResponse(
133 int /* status_code */,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected