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

Function TEST_F

tests/integration/tool_calling_integration_test.cpp:651–666  ·  view source on GitHub ↗

Test OpenAI-specific tool choice "none"

Source from the content-addressed store, hash-verified

649};
650
651// Test OpenAI-specific tool choice "none"
652TEST_F(OpenAISpecificToolTest, ToolChoiceNoneSupport) {
653 if (!use_real_api_) {
654 GTEST_SKIP() << "No OPENAI_API_KEY environment variable set";
655 }
656
657 GenerateOptions options(model_, "Tell me about the weather");
658 options.tools = tools_;
659 options.tool_choice = ToolChoice::none();
660 options.max_tokens = 150;
661
662 auto result = client_->generate_text(options);
663
664 TestAssertions::assertSuccess(result);
665 EXPECT_FALSE(result.text.empty());
666 EXPECT_FALSE(result.has_tool_calls());
667}
668
669class AnthropicSpecificToolTest : public ::testing::Test {

Callers

nothing calls this directly

Calls 4

generate_textMethod · 0.45
has_tool_callsMethod · 0.45
is_successMethod · 0.45
error_messageMethod · 0.45

Tested by

no test coverage detected