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

Method ControllableOpenAIClient

tests/utils/mock_openai_client.cpp:12–19  ·  view source on GitHub ↗

ControllableOpenAIClient implementation

Source from the content-addressed store, hash-verified

10
11// ControllableOpenAIClient implementation
12ControllableOpenAIClient::ControllableOpenAIClient(const std::string& api_key,
13 const std::string& base_url)
14 : predefined_status_code_(200),
15 should_fail_(false),
16 should_timeout_(false),
17 call_count_(0) {
18 predefined_response_ = ResponseBuilder::buildSuccessResponse();
19}
20
21void ControllableOpenAIClient::setPredefinedResponse(
22 const std::string& response,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected